(5) with Ada.Strings.Maps; package Ada.Strings.Fixed is pragma Preelaborate(Fixed); (6) -- "Copy" procedure for strings of possibly different lengths (7) procedure Move (Source : in String; Target : out String; Drop : in Truncation := Error; Justify : in Alignment := Left; Pad : in Character := Space); (8) -- Search subprograms (9) function Index (Source : in String; Pattern : in String; Going : in Direction := Forward; Mapping : in Maps.Character_Mapping := Maps.Identity) return Natural; (10) function Index (Source : in String; Pattern : in String; Going : in Direction := Forward; Mapping : in Maps.Character_Mapping_Function) return Natural; (11) function Index (Source : in String; Set : in Maps.Character_Set; Test : in Membership := Inside; Going : in Direction := Forward) return Natural; (12) function Index_Non_Blank (Source : in String; Going : in Direction := Forward) return Natural; (13) function Count (Source : in String; Pattern : in String; Mapping : in Maps.Character_Mapping := Maps.Identity) return Natural; (14) function Count (Source : in String; Pattern : in String; Mapping : in Maps.Character_Mapping_Function) return Natural; (15) function Count (Source : in String; Set : in Maps.Character_Set) return Natural; (16) procedure Find_Token (Source : in String; Set : in Maps.Character_Set; Test : in Membership; First : out Positive; Last : out Natural); (17) -- String translation subprograms (18) function Translate (Source : in String; Mapping : in Maps.Character_Mapping) return String; (19) procedure Translate (Source : in out String; Mapping : in Maps.Character_Mapping); (20) function Translate (Source : in String; Mapping : in Maps.Character_Mapping_Function) return String; (21) procedure Translate (Source : in out String; Mapping : in Maps.Character_Mapping_Function); (22) -- String transformation subprograms (23) function Replace_Slice (Source : in String; Low : in Positive; High : in Natural; By : in String) return String; (24) procedure Replace_Slice (Source : in out String; Low : in Positive; High : in Natural; By : in String; Drop : in Truncation := Error; Justify : in Alignment := Left; Pad : in Character := Space); (25) function Insert (Source : in String; Before : in Positive; New_Item : in String) return String; (26) procedure Insert (Source : in out String; Before : in Positive; New_Item : in String; Drop : in Truncation := Error); (27) function Overwrite (Source : in String; Position : in Positive; New_Item : in String) return String; (28) procedure Overwrite (Source : in out String; Position : in Positive; New_Item : in String; Drop : in Truncation := Right); (29) function Delete (Source : in String; From : in Positive; Through : in Natural) return String; (30) procedure Delete (Source : in out String; From : in Positive; Through : in Natural; Justify : in Alignment := Left; Pad : in Character := Space); (31) --String selector subprograms function Trim (Source : in String; Side : in Trim_End) return String; (32) procedure Trim (Source : in out String; Side : in Trim_End; Justify : in Alignment := Left; Pad : in Character := Space); (33) function Trim (Source : in String; Left : in Maps.Character_Set; Right : in Maps.Character_Set) return String; (34) procedure Trim (Source : in out String; Left : in Maps.Character_Set; Right : in Maps.Character_Set; Justify : in Alignment := Strings.Left; Pad : in Character := Space); (35) function Head (Source : in String; Count : in Natural; Pad : in Character := Space) return String; (36) procedure Head (Source : in out String; Count : in Natural; Justify : in Alignment := Left; Pad : in Character := Space); (37) function Tail (Source : in String; Count : in Natural; Pad : in Character := Space) return String; (38) procedure Tail (Source : in out String; Count : in Natural; Justify : in Alignment := Left; Pad : in Character := Space); (39) --String constructor functions (40) function "*" (Left : in Natural; Right : in Character) return String; (41) function "*" (Left : in Natural; Right : in String) return String; (42) end Ada.Strings.Fixed;
(44) procedure Move (Source : in String; Target : out String; Drop : in Truncation := Error; Justify : in Alignment := Left; Pad : in Character := Space);
(57) function Index (Source : in String; Pattern : in String; Going : in Direction := Forward; Mapping : in Maps.Character_Mapping := Maps.Identity) return Natural; function Index (Source : in String; Pattern : in String; Going : in Direction := Forward; Mapping : in Maps.Character_Mapping_Function) return Natural;
(59) function Index (Source : in String; Set : in Maps.Character_Set; Test : in Membership := Inside; Going : in Direction := Forward) return Natural;
(61) function Index_Non_Blank (Source : in String; Going : in Direction := Forward) return Natural;
(63) function Count (Source : in String; Pattern : in String; Mapping : in Maps.Character_Mapping := Maps.Identity) return Natural; function Count (Source : in String; Pattern : in String; Mapping : in Maps.Character_Mapping_Function) return Natural;
(65) function Count (Source : in String; Set : in Maps.Character_Set) return Natural;
(67) procedure Find_Token (Source : in String; Set : in Maps.Character_Set; Test : in Membership; First : out Positive; Last : out Natural);
(69) function Translate (Source : in String; Mapping : in Maps.Character_Mapping) return String; function Translate (Source : in String; Mapping : in Maps.Character_Mapping_Function) return String;
(71) procedure Translate (Source : in out String; Mapping : in Maps.Character_Mapping); procedure Translate (Source : in out String; Mapping : in Maps.Character_Mapping_Function);
(73) function Replace_Slice (Source : in String; Low : in Positive; High : in Natural; By : in String) return String;
(75) procedure Replace_Slice (Source : in out String; Low : in Positive; High : in Natural; By : in String; Drop : in Truncation := Error; Justify : in Alignment := Left; Pad : in Character := Space);
(77) function Insert (Source : in String; Before : in Positive; New_Item : in String) return String;
(79) procedure Insert (Source : in out String; Before : in Positive; New_Item : in String; Drop : in Truncation := Error);
(81) function Overwrite (Source : in String; Position : in Positive; New_Item : in String) return String;
(83) procedure Overwrite (Source : in out String; Position : in Positive; New_Item : in String; Drop : in Truncation := Right);
(85) function Delete (Source : in String; From : in Positive; Through : in Natural) return String;
(87) procedure Delete (Source : in out String; From : in Positive; Through : in Natural; Justify : in Alignment := Left; Pad : in Character := Space);
(89) function Trim (Source : in String; Side : in Trim_End) return String;
(91) procedure Trim (Source : in out String; Side : in Trim_End; Justify : in Alignment := Left; Pad : in Character := Space);
(93) function Trim (Source : in String; Left : in Maps.Character_Set; Right : in Maps.Character_Set) return String;
(95) procedure Trim (Source : in out String; Left : in Maps.Character_Set; Right : in Maps.Character_Set; Justify : in Alignment := Strings.Left; Pad : in Character := Space);
(97) function Head (Source : in String; Count : in Natural; Pad : in Character := Space) return String;
(99) procedure Head (Source : in out String; Count : in Natural; Justify : in Alignment := Left; Pad : in Character := Space);
(101) function Tail (Source : in String; Count : in Natural; Pad : in Character := Space) return String;
(103) procedure Tail (Source : in out String; Count : in Natural; Justify : in Alignment := Left; Pad : in Character := Space);
(105) function "*" (Left : in Natural; Right : in Character) return String; function "*" (Left : in Natural; Right : in String) return String;
-- Email comments, additions, corrections, gripes, kudos, etc. to:
Magnus Kempe -- Magnus.Kempe@di.epfl.ch