summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/string_slice2.adb
blob: e9a9efaa132e59df7822bf3a97134a2d086adb4d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
-- { dg-do compile }
-- { dg-options "-O" }

with Ada.Strings;
with Ada.Strings.Fixed;

procedure String_Slice2 is

   package ASF renames Ada.Strings.Fixed;

   Delete_String  : String(1..10);
   Source_String2 : String(1..12) := "abcdefghijkl";

begin

   Delete_String := Source_String2(1..10);

   ASF.Delete(Source  => Delete_String,
              From    => 6,
              Through => Delete_String'Last,
              Justify => Ada.Strings.Left,
              Pad     => 'x');

end;