Extract substrings before specified positions
extracts the substring that begins with the first character of
newStr = extractBefore(str,pat)str and ends before the substring specified by
pat. If pat occurs multiple times in
str, then newStr is str
from the start of str up to the first occurrence of
pat.
If str is a string array or a cell array
of character vectors, then extractBefore extracts
substrings from each element of str. The output
argument newStr has the same data type as str.
count | erase | extract | extractAfter | extractBetween | insertAfter | insertBefore | join | pattern | replace | split | strlength | textBoundary | wildcardPattern