object
string(Representation)
Representation- String representation. Valid values areatom,codes, andchars.
String manipulation predicates supporting different string representations.
logtalk_load(strings(loader))static, context_switching_callsPublic predicates
atom_string/2
Converts between an atom and a string.
staticatom_string(Atom,String)atom_string(+atom,?text) - zero_or_oneatom_string(-atom,+text) - zero_or_onenumber_string/2
Converts between a number and a string. Fails if the string does not represent a valid number.
staticnumber_string(Number,String)number_string(+number,?text) - zero_or_onenumber_string(-number,+text) - zero_or_onestring_chars/2
Converts between a string and a list of characters.
staticstring_chars(String,Chars)string_chars(+text,?list(character)) - zero_or_onestring_chars(-text,+list(character)) - zero_or_onestring_codes/2
Converts between a string and a list of character codes.
staticstring_codes(String,Codes)string_codes(+text,?list(character_code)) - zero_or_onestring_codes(-text,+list(character_code)) - zero_or_onestring_concat/3
Concatenates two strings.
staticstring_concat(String1,String2,String3)string_concat(+text,+text,?text) - zero_or_onestring_concat(?text,?text,+text) - zero_or_morestring_length/2
Returns the length of a string.
staticstring_length(String,Length)string_length(+text,?integer) - zero_or_onesub_string/5
Extracts a substring from a string.
staticsub_string(String,Before,Length,After,SubString)sub_string(+text,?integer,?integer,?integer,?text) - zero_or_morestring_upper/2
Converts a string to uppercase (ASCII only).
staticstring_upper(String,UpperString)string_upper(+text,?text) - zero_or_onestring_lower/2
Converts a string to lowercase (ASCII only).
staticstring_lower(String,LowerString)string_lower(+text,?text) - zero_or_onesplit_string/4
Decomposes String into SubStrings according to separators SepChars and padding characters PadChars. The string is split at the separators, and any padding characters around the resulting sub-strings are removed. Characters in both SepChars and PadChars are treated as separators where sequences count as one separator, and are ignored at string boundaries.
staticsplit_string(String,SepChars,PadChars,SubStrings)split_string(+text,+text,+text,-list(text)) - oneatomics_to_string/2
Concatenates the atomic terms in List into String. The list may contain numbers, atoms, and strings (in the current representation).
staticatomics_to_string(List,String)atomics_to_string(++list(atomic),-text) - oneatomics_to_string/3
Concatenates the atomic terms in List into String, with Separator inserted between each element. The list may contain numbers, atoms, and strings (in the current representation).
staticatomics_to_string(List,Separator,String)atomics_to_string(++list(atomic),+text,-text) - onetrim/2
Trims string by deleting all leading and trailing whitespace.
statictrim(String,Trimmed)trim(+text,-text) - onetrim/3
Trims string by deleting all occurrences of the characters in Elements from the beginning and end of the string.
statictrim(String,Elements,Trimmed)trim(+text,+text,-text) - onetrim_left/2
Trims string by deleting all leading whitespace.
statictrim_left(String,Trimmed)trim_left(+text,-text) - onetrim_left/3
Trims string by deleting all occurrences of the characters in Elements from the beginning of the string.
statictrim_left(String,Elements,Trimmed)trim_left(+text,+text,-text) - onetrim_right/2
Trims string by deleting all trailing whitespace.
statictrim_right(String,Trimmed)trim_right(+text,-text) - onetrim_right/3
Trims string by deleting all occurrences of the characters in Elements from the end of the string.
statictrim_right(String,Elements,Trimmed)trim_right(+text,+text,-text) - oneProtected predicates
(no local declarations; see entity ancestors if any)
Private predicates
(no local declarations; see entity ancestors if any)
Operators
(none)