class UNICODE_STRING
Summary
Class invariant
Overview
creation features
  • make (needed_capacity: INTEGER_32)
    Initialize the string to have at least needed_capacity characters of storage.
  • copy (other: UNICODE_STRING)
    Copy other onto Current.
  • make_empty
    Create an empty string.
  • make_filled (unicode: INTEGER_32, n: INTEGER_32)
    Initialize string with n copies of unicode.
  • from_utf8 (s: STRING)
    Use s as UTF-8 format encoded unicode string This function may be used for manifest strings See utf8_decode_from for error detection
exported features
Creation / Modification:
Testing:
Testing and Conversion:
Modification:
Printing:
Agents based features:
Other features:
Splitting a STRING:
  • split: ARRAY[UNICODE_STRING]
    Split the string into an array of words.
  • split_in (words: COLLECTION[UNICODE_STRING])
    Same jobs as split but result is appended in words.
Other features:
  • infix "<=" (other: UNICODE_STRING): BOOLEAN
    Is Current less than or equal other?
  • infix ">" (other: UNICODE_STRING): BOOLEAN
    Is Current strictly greater than other?
  • infix ">=" (other: UNICODE_STRING): BOOLEAN
    Is Current greater than or equal than other?
  • in_range (lower: UNICODE_STRING, upper: UNICODE_STRING): BOOLEAN
    Return True if Current is in range [lower..upper]
    See also min, max, compare.
  • min (other: UNICODE_STRING): UNICODE_STRING
    Minimum of Current and other.
  • max (other: UNICODE_STRING): UNICODE_STRING
    Maximum of Current and other.
Indexing:
count: INTEGER_32
writable attribute
String length which is also the maximum valid index.
capacity: INTEGER_32
writable attribute
Capacity of the storage area.
lower: INTEGER_32
constant attribute
Minimum index; actually, this is always 1 (this feature is here to mimic the one of the COLLECTIONs hierarchy).
upper: INTEGER_32
effective function
Maximum index; actually the same value as count (this feature is here to mimic the one of the COLLECTION hierarchy).
make (needed_capacity: INTEGER_32)
effective procedure
Initialize the string to have at least needed_capacity characters of storage.
make_empty
effective procedure
Create an empty string.
make_filled (unicode: INTEGER_32, n: INTEGER_32)
effective procedure
Initialize string with n copies of unicode.
is_empty: BOOLEAN
effective function
Has string length 0?
effective function
Get unicode at position i.
infix "@" (i: INTEGER_32): INTEGER_32
effective function
The infix notation which is actually just a synonym for item.
hash_code: INTEGER_32
effective function
The hash-code value of Current.
infix "<" (other: UNICODE_STRING): BOOLEAN
effective function
Is Current less than other?
compare (other: UNICODE_STRING): INTEGER_32
effective function
If current object equal to other, 0 if smaller, -1; if greater, 1.
three_way_comparison (other: UNICODE_STRING): INTEGER_32
effective function
If current object equal to other, 0 if smaller, -1; if greater, 1.
is_equal (other: UNICODE_STRING): BOOLEAN
effective function
Do both strings have the same character sequence?
same_as (other: UNICODE_STRING): BOOLEAN
effective function
Case insensitive is_equal.
index_of (unicode: INTEGER_32, start_index: INTEGER_32): INTEGER_32
effective function
Index of first occurrence of unicode at or after start_index, 0 if none.
reverse_index_of (unicode: INTEGER_32, start_index: INTEGER_32): INTEGER_32
effective function
Index of first occurrence of unicode at or before start_index, 0 if none.
first_index_of (unicode: INTEGER_32): INTEGER_32
effective function
Index of first occurrence of unicode at index 1 or after index 1.
has (unicode: INTEGER_32): BOOLEAN
effective function
True if unicode is in the STRING.
has_substring (other: UNICODE_STRING): BOOLEAN
effective function
True if Current contains other.
occurrences (unicode: INTEGER_32): INTEGER_32
effective function
Number of times character unicode appears in the string.
has_suffix (s: UNICODE_STRING): BOOLEAN
effective function
True if suffix of Current is s.
has_prefix (p: UNICODE_STRING): BOOLEAN
effective function
True if prefix of Current is p.
is_ascii: BOOLEAN
effective function
True if all unicode value is in range 0..127
to_utf8: STRING
effective function
New string is created, current unicode string is encoded with UTF-8 format.
to_string: STRING
effective function
New string is created, current unicode string is encoded with UTF-8 format.
utf8_encode_in (s: STRING)
effective procedure
append current unicode string in s with UTF-8 format
utf16be_encode_in (s: STRING)
effective procedure
append current unicode string in s with UTF-16BE format
utf8_decode_from (s: STRING): BOOLEAN
effective function
Use s as UTF-8 format encoded unicode string Return False if decoding process failed
resize (new_count: INTEGER_32)
effective procedure
Resize Current.
clear_count
effective procedure
Discard all characters (is_empty is True after that call).
wipe_out
effective procedure
Discard all characters (is_empty is True after that call).
clear_count_and_capacity
effective procedure
Discard all characters (is_empty is True after that call).
copy (other: UNICODE_STRING)
effective procedure
Copy other onto Current.
fill_with (unicode: INTEGER_32)
effective procedure
Replace every unicode with the new value.
replace_all (old_code: INTEGER_32, new_code: INTEGER_32)
effective procedure
Replace all occurrences of the element old_code by new_code.
append (s: UNICODE_STRING)
effective procedure
Append a copy of 's' to Current.
append_string (s: UNICODE_STRING)
effective procedure
Append a copy of 's' to Current.
prepend (other: UNICODE_STRING)
effective procedure
Prepend other to Current.
insert_string (s: UNICODE_STRING, i: INTEGER_32)
effective procedure
Insert s at index i, shifting characters from index i to count rightwards.
replace_substring (s: UNICODE_STRING, start_index: INTEGER_32, end_index: INTEGER_32)
effective procedure
Replace the substring from start_index to end_index, inclusive, with s.
infix "+" (other: UNICODE_STRING): UNICODE_STRING
effective function
Create a new UNICODE_STRING which is the concatenation of Current and other.
put (unicode: INTEGER_32, i: INTEGER_32)
effective procedure
Put unicode at position i.
swap (i1: INTEGER_32, i2: INTEGER_32)
effective procedure
insert_character (unicode: INTEGER_32, i: INTEGER_32)
effective procedure
Inserts unicode at index i, shifting characters from position 'i' to count rightwards.
shrink (min_index: INTEGER_32, max_index: INTEGER_32)
effective procedure
Keep only the slice [min_index .. max_index] or nothing when the slice is empty.
remove (i: INTEGER_32)
effective procedure
Remove character at position i.
add_first (unicode: INTEGER_32)
effective procedure
Add unicode at first position.
precede (unicode: INTEGER_32)
effective procedure
Add unicode at first position.
add_last (unicode: INTEGER_32)
effective procedure
Append unicode to string.
append_character (unicode: INTEGER_32)
effective procedure
Append unicode to string.
extend (unicode: INTEGER_32)
effective procedure
Append unicode to string.
to_lower
effective procedure
Convert the string to lower case.
to_upper
effective procedure
Convert the string to upper case.
as_lower: UNICODE_STRING
effective function
New object in lower case.
as_upper: UNICODE_STRING
effective function
New object in upper case.
keep_head (n: INTEGER_32)
effective procedure
Remove all characters except for the first n.
keep_tail (n: INTEGER_32)
effective procedure
Remove all characters except for the last n.
remove_head (n: INTEGER_32)
effective procedure
Remove n first characters.
remove_first (n: INTEGER_32)
effective procedure
Remove n first characters.
remove_tail (n: INTEGER_32)
effective procedure
Remove n last characters.
remove_last (n: INTEGER_32)
effective procedure
Remove n last characters.
remove_substring (start_index: INTEGER_32, end_index: INTEGER_32)
effective procedure
Remove all characters from strt_index to end_index inclusive.
remove_between (start_index: INTEGER_32, end_index: INTEGER_32)
effective procedure
Remove all characters from strt_index to end_index inclusive.
remove_suffix (s: UNICODE_STRING)
effective procedure
Remove the suffix s of current string.
remove_prefix (s: UNICODE_STRING)
effective procedure
Remove the prefix s of current string.
left_adjust
effective procedure
Remove leading blanks.
right_adjust
effective procedure
Remove trailing blanks.
out_in_tagged_out_memory
effective procedure
Append terse printable represention of current object in tagged_out_memory.
fill_tagged_out_memory
effective procedure
Append a viewable information in tagged_out_memory in order to affect the behavior of out, tagged_out, etc.
do_all (action: ROUTINE[TUPLE 1[INTEGER_32]])
effective procedure
Apply action to every item of Current.
effective function
Do all items satisfy test?
effective function
Does at least one item satisfy test?
first: INTEGER_32
effective function
Access to the very first character.
last: INTEGER_32
effective function
Access to the very last character.
substring (start_index: INTEGER_32, end_index: INTEGER_32): UNICODE_STRING
effective function
New string consisting of items [start_index.. end_index].
extend_multiple (unicode: INTEGER_32, n: INTEGER_32)
effective procedure
Extend Current with n times character unicode.
precede_multiple (unicode: INTEGER_32, n: INTEGER_32)
effective procedure
Prepend n times character unicode to Current.
extend_to_count (unicode: INTEGER_32, needed_count: INTEGER_32)
effective procedure
Extend Current with unicode until needed_count is reached.
precede_to_count (unicode: INTEGER_32, needed_count: INTEGER_32)
effective procedure
Prepend unicode to Current until needed_count is reached.
reverse
effective procedure
Reverse the string.
remove_all_occurrences (unicode: INTEGER_32)
effective procedure
Remove all occurrences of unicode.
substring_index (other: UNICODE_STRING, start_index: INTEGER_32): INTEGER_32
effective function
Position of first occurrence of other at or after start; 0 if none.
first_substring_index (other: UNICODE_STRING): INTEGER_32
effective function
Position of first occurrence of other at or after 1; 0 if none.
split: ARRAY[UNICODE_STRING]
effective function
Split the string into an array of words.
split_in (words: COLLECTION[UNICODE_STRING])
effective procedure
Same jobs as split but result is appended in words.
extend_unless (unicode: INTEGER_32)
effective procedure
Extend Current (using extend) with unicode unless unicode ch is already the last character.
get_new_iterator: ITERATOR[INTEGER_32]
effective function
valid_unicode (unicode: INTEGER_32): BOOLEAN
effective function
is_space (unicode: INTEGER_32): BOOLEAN
effective function
is_separator (unicode: INTEGER_32): BOOLEAN
effective function
is_combining (unicode: INTEGER_32): BOOLEAN
effective function
infix "<=" (other: UNICODE_STRING): BOOLEAN
effective function
Is Current less than or equal other?
infix ">" (other: UNICODE_STRING): BOOLEAN
effective function
Is Current strictly greater than other?
infix ">=" (other: UNICODE_STRING): BOOLEAN
effective function
Is Current greater than or equal than other?
in_range (lower: UNICODE_STRING, upper: UNICODE_STRING): BOOLEAN
effective function
Return True if Current is in range [lower..upper]
See also min, max, compare.
min (other: UNICODE_STRING): UNICODE_STRING
effective function
Minimum of Current and other.
max (other: UNICODE_STRING): UNICODE_STRING
effective function
Maximum of Current and other.
valid_index (i: INTEGER_32): BOOLEAN
effective function
True when i is valid (i.e., inside actual bounds).