Methods
-
arduino_string_char_at(location, string)
-
Returns the character at the given location of a string.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description location
Number the position of the character to return, starting at 0
string
String the string to get the character from
Code Equivalent:
string.charAt(location)
-
arduino_string_compare_to(lhs, rhs)
-
Compares two strings, testing whether one comes before the other alphabetically. The comparison uses ASCII values and is case sensitive, meaning that upper case letters have a higher value than lower case letters. The strings are compared character by character.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description lhs
String one of the strings to check
rhs
String one of the strings to check
Code Equivalent:
lhs.compareTo(rhs)
-
arduino_string_concat(input, string)
-
Concatenates the input data to the string, appending it to the end.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description input
the string/value to append
string
String the string to append to
Code Equivalent:
string.concat(input);
-
arduino_string_create(input)
-
Creates a string from the given text and stores it in a variable.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description input
String the text to store in the string
Code Equivalent:
String(input)
-
arduino_string_create_base(input, base)
-
Converts the given number to the chosen base and returns it as a string.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description input
Number the number to convert
base
Number the base to convert the number to
Code Equivalent:
String(input, base)
-
arduino_string_ends_with(input, string)
-
Returns true/false if the string ends with the same character as the input string.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description input
String one of the strings to check
string
String one of the strings to check
Code Equivalent:
string.endsWith(input)
-
arduino_string_equals(lhs, rhs)
-
Compares two strings for equality with case sensitivity, returning true or false. "dragon" is not equal to "Dragon" or "DRAGON".
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description lhs
String one of the strings to compare
rhs
String one of the strings to compare
Code Equivalent:
lhs.equals(rhs)
-
arduino_string_equals_ignore_case(lhs, rhs)
-
Compares two strings for equality without case sensitivity, returning true or false. "dragon" is will be equal to "Dragon" or "DRAGON".
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description lhs
String one of the strings to compare
rhs
String one of the strings to compare
Code Equivalent:
lhs.equalsIgnoreCase(rhs)
-
arduino_string_index_of(input, string, position)
-
Locates a character/string/value within a string. It will search from the beginning of the string, or from the given index if provided. It will return the index of the input, or -1 if not found.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description input
the data to search for
string
String the string to search in
position
Number the position to start the search from
Code Equivalent:
string.indexOf(input, position);
-
arduino_string_length(string)
-
Returns the length of the given string in characters.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description string
String the string to get the length of
Code Equivalent:
string.length()
-
arduino_string_remove(start, string, end)
-
Modifies a string by removing characters from the given start index to the given end index.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description start
Number the start index to remove characters from
string
String the string to remove characters from
end
Number the end index to remove characters from
Code Equivalent:
string.remove(start, end);
-
arduino_string_replace(lhs, rhs, string)
-
Replaces all instances of the lhs character with the rhs character in the given string.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description lhs
String the character to replace
rhs
String the character to replace lhs with
string
String the string to replace characters in
Code Equivalent:
string.replace(lhs, rhs);
-
arduino_string_starts_with(lhs, rhs)
-
Returns true/false if the lhs string starts with the same characters as the rhs string.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description lhs
String one of the strings to check
rhs
String one of the strings to check
Code Equivalent:
lhs.startsWith(rhs)
-
arduino_string_substring(start, end, string)
-
Returns a substring of the given string between the start and end indices. The start is inclusive, and the end is exclusive.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description start
Number the starting index
end
Number the ending index
string
String the string to get the substring from
Code Equivalent:
string.substring(start, end)
-
arduino_string_to_float(string)
-
Converts a valid string to an float and returns the value. The string will only be converted if it starts with a digit, and will return 0 otherwise.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description string
String the string to convert
Code Equivalent:
string.toFloat()
-
arduino_string_to_int(string)
-
Converts a valid string to an integer and returns the value. The string will only be converted if it starts with an integer number. If the string contains non integer numbers, it will return 0.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description string
String the string to convert
Code Equivalent:
string.toInt()
-
arduino_string_to_lower(string)
-
Converts the given string to all lower case.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description string
String string to convert
Code Equivalent:
string.toLowerCase();
-
arduino_string_to_upper(string)
-
Converts the given string to all upper case.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description string
String string to convert
Code Equivalent:
string.toUpperCase();
-
arduino_string_trim(string)
-
Removes all leading and trailing white space from the string.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description string
String the string to modify
Code Equivalent:
string.trim();