Strings
Built-in functions › Programming and data types › Strings
39 functions in this category.
| Function | What it does |
|---|---|
append | Concatenate strings without trimming. |
assert | Assert that a condition is true; throw an error if not. |
blanks | String of n space characters. |
deal | Distribute multiple inputs to multiple outputs. |
deblank | Remove trailing whitespace from a string. |
eps | Floating-point relative accuracy (machine epsilon). |
erase | Remove all occurrences of a pattern from a string. |
eraseBetween | Remove the substring between two boundary patterns. |
eval | Execute a string as MathJet code. |
evalc | Evaluate a string and capture its console output. |
evalin | Evaluate a string in a different workspace. |
findstr | Find one string within another (returns positions of all occurrences). |
input | Prompt the user for input from the console. |
inputname | Variable name of a function argument from the caller’s perspective. |
ischar | Test whether the input is a character array. |
isletter | Test whether each character is alphabetic. |
isspace | Test whether each character is whitespace. |
isstrprop | Test whether characters belong to a named character category. |
join | Join an array of strings into a single string. |
lower | Convert string to lowercase. |
newline | The newline character (\n). |
pi | Mathematical constant π. |
realmax | Largest positive finite floating-point number. |
realmin | Smallest positive normalized floating-point number. |
regexp | Match a regular expression against a string. |
regexpi | Match a regular expression against a string (case-insensitive). |
reverse | Reverse the order of characters in a string. |
sprintf | Format data into a string. |
strcat | Concatenate strings horizontally. |
strcmp | Compare strings for equality (case-sensitive). |
strcmpi | Compare strings for equality (case-insensitive). |
strfind | Find one string within another. |
strncmp | Compare the first n characters of two strings (case-sensitive). |
strncmpi | Compare the first n characters of two strings (case-insensitive). |
strrep | Replace all occurrences of a substring. |
strtrim | Remove leading and trailing whitespace from a string. |
strtrunc | Truncate a string to a specified length. |
strvcat | Concatenate strings vertically (pad to equal length). |
upper | Convert string to uppercase. |