String Fields and Functions
Strings have multiple built-in functions you can use.
Returns the number of characters in the string as an integer.
-
Concatenates the string other
to the end of the original string, but does not modify the original string. This function creates a new string whose length is the sum of the lengths of the string the function is called on and the string given as a parameter.
-
Returns a string slice of the characters in the given string from start index from
up to, but not including, the end index upTo
. This function creates a new string whose length is upTo - from
. It does not modify the original string. If either of the parameters are out of the bounds of the string, the function will fail.
-
Returns an array containing the bytes represented by the given hexadecimal string.
The given string must only contain hexadecimal characters and must have an even length. If the string is malformed, the program aborts
Last updated