Operations for character strings
Survey of all available operations:
String operations:
Adding of strings | With + 2 strings are combined. V.E.str = "Hello" + " world!" (-> Result is "Hello world!") |
+ | |
Identification of | LEFT determines the left starting string of a string. Based on the first character, get nbr characters from string str. V.E.str = LEFT["Hello world!",5] (-> Result is "Hello") |
LEFT[str, nbr] | |
Identification of | MID determines the partial string of a string. Starting with the character at position pos, get nbr characters from string str. V.E.str = MID["How are you?", 3,5] (-> Result is "are") |
MID[str, nbr, pos] | |
Identification of | RIGHT determines the right closing string of a string. Based on the last character, get nbr characters from string str. V.E.str = RIGHT["Hello world! How are you?", 12] (-> Result is "How are you?") |
RIGHT[str, nbr] | |
Identification of | LEN determines the length (number of characters) of a string. P1 = LEN["Hello world! How are you?"] (-> Result is 25) |
LEN[str] |
FIND[..] is case sensitive! |
Searching a | FIND searches a string str2 in a string str1 and determines the position of the first matching of str2 in str1 as a result. V.E.str1 = "Hello world! How are you?" (-> Result is 14) If string str2 does not exist in string str1, FIND determines value 0 as a result. V.E.str1 = "Hello world! How are you?" (-> Result is 0) |
FIND[str1, str2] | |
Deleting a | DELETE deletes in string str a number of certain characters nbr, starting with the character at position pos. V.E.str = DELETE["Hello world! How are you?", 5, 7] (->Result is "Hello ! How are |
DELETE[str, nbr, pos] | |
Inserting a | INSERT inserts a string str2 into a string str1, starting behind the character at position pos. V.E.str1 = "Hello ! How are you?" (-> Result is "Hello world! How are |
INSERT[str1, str2, pos] | |
Replacing a partial string | REPLACE replaces a number of characters nbr in string str1 by a partial string str2, starting with the character at position pos. V.E.str1 = "What is your name?" (->Result is "What is your age?") |
REPLACE[str1, str2, nbr, pos] |
Comparison operators:
The comparison operations are case sensitive! |
Equality | V.E.str1 = "Peter" (-> Result is "Peter is equal to Peter") |
== | |
Inequality | V.E.str1 = "Peter" (-> Result is "Peter is not equal to Steve") |
!= | |
greater than / greater than or equal to | V.E.str1 = "Peter" (-> Result is "Peter is greater than or equal to Peter!") V.E.str1 = "Peter" (-> Result is "Peter is greater than |
> >= | |
less than / less than or equal to | V.E.str1 = "Peter" (-> Result is "Peter is less than or equal to V.E.str1 = "Bob" (-> Result is "Bob is less than Tim!") |
< <= |
Conversion functions:
Integer to String | INT_TO_STR[...] | V.E.str = INT_TO_STR[123] |
Real64 to String | REAL_TO_STR[...] | V.E.str = REAL_TO_STR[12.34] |
String to Integer | STR_TO_INT[...] | V.E.sgn32 = STR_TO_INT["12"] |
String to Real64 | STR_TO_REAL[...] | V.E.real64 = |