|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 7168 (0x1c00)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package More_String_Utilities, seg_004658
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦cfc2e13cd⟧ »Space Info Vol 2«
└─⟦this⟧
--| @SUMMARY Provides useful string utilities not provided by the
--| String_Utilities package in !Tools.
--|
--| @INDICES (String_Processing, Utility)
--|
package More_String_Utilities is
--| @SUMMARY Returns True iff the specified fragment matches the initial
--| Fragment'Length characters of the In_String.
--|
function Begins_With (Fragment : String; In_String : String) return Boolean;
--| @SUMMARY Returns True iff the specified fragment matches the last
--| Fragment'Length characters of the In_String.
--|
function Ends_With (Fragment : String; In_String : String) return Boolean;
--| @SUMMARY Returns True iff the specified fragment appears somewhere
--| inside In_String.
--|
function Contains (Fragment : String; In_String : String) return Boolean;
--| @SUMMARY Returns True iff the specified string is null or contains only
--| blanks and tabs.
--|
function Is_Blank (This_String : in String) return Boolean;
--| @SUMMARY Returns True iff the specified string contains no blanks
--| or tabs.
--|
function Is_Continuous (This_String : in String) return Boolean;
--| @SUMMARY Returns True iff the specified string has leading or trailing
--| blanks or tabs.
--|
function Is_Padded (This_String : in String) return Boolean;
--| @SUMMARY Returns a string stripped of all characters which match
--| the specified character. For instance, if the character is ' ':
--|
--| "This string contains spaces" => "Thisstringcontainsspaces"
--|
--| @SPECIAL_NOTES If "Ignore_Case" is True, both uppercase and lowercase
--| characters which match the specified character will be stripped.
--|
function Stripped (This_String : in String;
This_Character : in Character := ' ';
Ignore_Case : in Boolean := False) return String;
--| @SUMMARY Returns a string stripped of all substrings which match
--| the specified substring. For instance, if the substring is "in":
--|
--| "This string contains spaces" => "This strg contas spaces"
--|
--| @SPECIAL_NOTES If "Ignore_Case" is True, both uppercase and lowercase
--| characters which match the characters in the specified substring
--| will be stripped.
--|
function Stripped (This_String : in String;
This_Substring : in String;
Ignore_Case : in Boolean := False) return String;
--| @SUMMARY Returns a string with the character at the specified
--| location in the string replaced with the specified character.
--|
function Replace (Character_At : in Positive;
With_Character : in Character;
In_String : in String) return String;
--| @SUMMARY Returns a string with every occurrence of "Old_Character"
--| replaced by "New_Character". For instance, if the old character
--| is ' ' and the new character is '_':
--|
--| "This string contains spaces" => "This_string_contains_spaces"
--|
--| @SPECIAL_NOTES If "Ignore_Case" is True, both uppercase and lowercase
--| characters which match the specified old character will be replaced.
--|
function Replaced (This_String : in String;
Old_Character : in Character := '_';
New_Character : in Character := ' ';
Ignore_Case : in Boolean := False) return String;
--| @SUMMARY Returns a string with the indicated range replaced with
--| the specified substring. The length of the range can be less than,
--| equal to, or greater than the length of the substring.
--|
--| @SPECIAL_NOTES If the length of the range is < 0, the specified
--| substring is inserted into the string starting at "From_Here",
--| and no characters are removed from the existing string.
--|
function Replace (From_Here : in Positive;
To_Here : in Positive;
With_Substring : in String;
In_String : in String) return String;
--| @SUMMARY Returns a string with every occurrence of "Old_Substring"
--| replaced by "New_Substring" (the two substrings need not be the same
--| length). For instance, if the old substring is "in" and the new
--| substring is "out":
--|
--| "This string contains spaces" => This stroutng contaouts spaces"
--|
--| @SPECIAL_NOTES If "Ignore_Case" is True, both uppercase and lowercase
--| characters which match the characters in the specified old substring
--| will be replaced.
--|
function Replaced (This_String : in String;
Old_Substring : in String;
New_Substring : in String;
Ignore_Case : in Boolean := False) return String;
end More_String_Utilities;
nblk1=6
nid=0
hdr6=c
[0x00] rec0=1b rec1=00 rec2=01 rec3=04c
[0x01] rec0=18 rec1=00 rec2=02 rec3=014
[0x02] rec0=14 rec1=00 rec2=03 rec3=08c
[0x03] rec0=13 rec1=00 rec2=04 rec3=07a
[0x04] rec0=15 rec1=00 rec2=05 rec3=04c
[0x05] rec0=04 rec1=00 rec2=06 rec3=000
tail 0x2170025d0815c66390176 0x42a00088462061e03