You are on page 1of 10

lookfor string

string - Convert to string array


verLessThan - Compare version of toolbox to specified version string.
genvarname - will be removed in a future release. Use
MATLAB.LANG.MAKEVALIDNAME and MATLAB.LANG.MAKEUNIQUESTRINGS
instead.
message - Internal utility to access translated message strings
validatestring - Check validity of text string.
compose - Converts data into formatted string arrays
eraseBetween - Remove substring from text
extractAfter - Extract substring after a specified position
extractBefore - Extract substring before a specified position
extractBetween - Extract substring from text
hex2num - Convert IEEE hexadecimal string to double precision
number
insertAfter - Insert substring after a specified position
insertBefore - Insert substring before a specified position
isstring - Determine whether input is string array
isstrprop - Check if string elements are of a specified category.
join - Append elements of a string array together
num2hex - Convert singles and doubles to IEEE hexadecimal
string format
replace - Replace segments from string elements
replaceBetween - Replace bounded substring in string elements
reverse - Reverse the order of characters in string
split - Split strings in string array
splitlines - Split string at newline characters
sprintf - Write formatted data to string or character vector
sscanf - Read string or character vector as formatted data
str2double - Convert string to double precision value
strcmp - Compare strings or character vectors
strcmpi - Compare strings or character vectors ignoring case
strfind - Find one string within another
strings - Create array of string with no characters
strjoin - Append elements of a string array
strncmp - Compare first N characters of strings or character
vectors
strncmpi - Compare first N characters of strings or character
vectors ignoring case
strread - Read formatted data from string.
strrep - Find and replace substring.
strsplit - Split string at delimiter
strtok - Split string into tokens.
getVersion - returns the version string of an Excel Add-In
Deploytool project
texlabel - Produces the TeX format from a character string.
datetickstr - Returns the date string associated with the values
input. Any values of
parseparams - Finds first string argument.
colstyle - Parse color and style from string.
clipboard - Copy and paste strings to and from system clipboard.
textwrap - Return wrapped string matrix for given UI Control.
urldecode - Replace URL-escaped strings with their original
characters
dparseit - Unparse a string for the DEE.
getCompuMethodFormat - outputs the string "Format" for the
COMPU_METHOD for
getFloatingPointCompuMethodFormat - outputs the string "Format" for the
slSubStr - SUBSTR Extract a substring out of a string.
sfundemo_maskdisp - Provides the string to be displayed on the mask
for blocks that
resolve_type - isFixdt is set to true when the input string matches
the 'fixdt(...)' pattern.
aa2int - converts a string of amino acids from letters to numbers.
align2cigar - convert aligned sequences to the corresponding CIGAR
strings.
cigar2align - convert unaligned sequences to aligned sequences
using CIGAR strings.
hmmprofmerge - aligns the output strings of several profile
alignments.
nt2int - convert a string of nucleotides from letters to numbers.
seqmatch - Find matches for every string in a library.
release_version - Return a version string of the form R14, R14SP2,
R14SP2plus etc.
hConvertStringPolysToNum - convert string polynomials (e.g., '1+X+X^3')
to equivalent numeric
lab2str - Compact and convert labels in string line or matrix.
poly2str - Return polynomial as string.
binaryVectorToHex - Convert binary vector to a hexadecimal character
string.
qbhelp - Visual Query Builder help string.
convertToString - convert numerical param to string
datedisp - Display a matrix with serial date entries formatted as
date strings.
finargfmt - Format arguments into strings according to argument
class.
finargstring - Format an argument into a string object.
freqstr - returns the string representation of the numeric
frequency indicator.
getnameidx - returns the order number of a string in a list of
strings.
charhelp - This file contains help text strings for Financial Expo on
line
lf_message - Generate a message string based on the ID passed by
argument.
strchoice - string choice among a given list.
idarxstr - Creates a matrix of arxorders based on a string
definition
idmspop - Returns the model structure popup string.
idstrip - Converts a string of numbers, separated by spaces, to
numbers.
foccheck - Validate focus values. Ignores string values.
idpoly2str - POLY2STR Return polynomial as string.
iptcheckstrs - Check validity of text string.
imaqgetdisplaystring - Return a display string for the Video Input block.
angl2str - Format angle strings
checkangleunits - Check and standardize angle units string
dist2str - Format distance strings
num2ordinal - Convert positive integer to ordinal string.
str2angle - Convert strings to angles in degrees
unitstr - Check unit strings or abbreviations
leadblnk - Deletes leading characters common to all rows of a
string matrix
shiftspc - Left or right justify a string matrix
pdebsplit - Splits space separated string into separate rows.
pdecchk - Checks PDE equation's c coefficient string matrix.
pdeinfo - Displays information string for PDE Toolbox.
pdequote - Doubles all quotes in a string matrix.
pdet2str - Tick marks to string converter.
importrobot - Import a rigid body tree model from URDF file or
string
strseq - Builds a sequence of indexed strings.
udtGetSPCUDTFltPtTrumpsDisclaimerStr - (fixptBlurb) Returns appropriate
disclaimer string
dspGetMessageString - Take a string or message ID and return the string
dspGetSPRoundMode - Returns the rounding mode string to display on
the fixed-point tab of filter
dspblkResolveUDTString - DSP System Toolbox library block mask helper
function
getSPCUDTFltPtTrumpsDisclaimerStr - (fixptBlurb) Returns appropriate
disclaimer string
iptnum2ordinal - Convert positive integer to ordinal string.
validateLengthUnit - Validate and standardize length unit string
StringWriter - Return a StringWriter object.
largestuiwidth - LARGESTEUIWIDTH Return the uicontrol extent
width of the largest string in
convert2engstrs - Convert a vector to engineering strings.
fdatoolmessage - Translates the string from an ID.
fixup_uiedit - Get the string from each edit box uicontrol, deblank
genmcodeutils - Formats a string for use with generated MATLAB
code
getfrequnitstrs - Return a cell array of frequency units strings.
getmagunitstrs - Return a cell array of the standard Magnitude Units
strings.
interspace - Add spaces to the string when we find a capital letter.
signal_num2str - Convert the number to a string.
getInputString - generates a comma separated list of variables to be
casewrite - Writes casenames from a string matrix to a file.
str2symunit - Convert strings to physical units
symunit2str - Convert symbolic units to a string
enum2val - Converts an enumerated string to its numerical
equivalent.
deblankl - Convert string to lowercase without blanks.
getonoff - Returns a matrix of strings with 'off' or 'on '.
handle2str - Convert a handle to a string.
num2mstr - Convert number to string in maximum precision.
wstr2num - Convert string to number.
wstrcoor - Format string of coordinates values.
wtranslate - Translation of strings for GUI and command line
functions.
ipAddressFromString - Evaluate a string IP Address.
ipaddr - Verifies input is a valid IPv4 address and converts the
string
macaddr - converts a string based MAC address to a vector based
MAC address.
xpcdarray2str - Private function for displaying double arrays as strings
string Convert to string array
STR = string creates a string. STR is a 1-by-1 string that contains no
characters.

STR = string(CHR) converts character vector CHR to string array STR.


If CHR is a 1-by-N character vector then string returns STR as a 1-by-1
string that contains N characters.

STR = string(C) converts cell array C to a string array. Each element


of C must contain a value that can be converted to a string scalar. STR
is the same size as C.

STR = string(X) converts the numeric matrix X into a string


representation STR. STR is the same size as X.

STR = string(TF) converts the logical matrix TF into a string


representation STR where each element of STR contains either "true" or
"false". STR is the same size as TF.

MATLAB displays string values with double quotes (for example, "ABC"),
and character arrays with single quotes (for example, 'ABC'), to
distinguish the two different data types.

string methods and functions:


string inspection:
contains - True if pattern is found in string
count - Number of occurrences of a pattern
endsWith - True if string ends with pattern
ismissing - True for <missing> string elements
isstring - True for string array
startsWith - True if string starts with pattern
strlength - Lengths of string elements
string manipulation:
compose - Converts data into formatted string arrays
erase - Remove substring from string elements
eraseBetween - Remove bounded substrings
extractAfter - Extract substring after a specified position
extractBefore - Extract substring before a specified position
extractBetween - Extract bounded substrings
insertAfter - Insert substring after a specified position
insertBefore - Insert substring before a specified position
join - Append elements of a string array together
lower - Convert string to lowercase
pad - Insert leading or trailing spaces
plus - Append string arrays
replace - Find and replace substring
replaceBetween - Replace bounded substrings
reverse - Reverse the order of characters
split - Split string at delimiter
splitlines - Split string at newlines
strings - Create string array of empty string elements
strip - Remove leading and trailing whitespaces
upper - Convert string to uppercase
string conversion:
cellstr - Convert to a cell array of character vectors
char - Convert to a character array
double - Convert to a double array
string operators:
+ - Append string arrays
==, ~= - Equal and not equal for string arrays
<, <=, >, >= - Comparison for string arrays
{} - Index character vector contents of string element

string compatible functions:


deblank - Remove trailing whitespaces
regexp - Match regular expression
regexprep - Replace string using regular expression
regexptranslate - Regular expression related string transformations
sprintf - Write formatted data to string
strcat - Concatenate text
strcmp - Compare strings
strncmp - Compare first N characters
strfind - Find one string within another
strjoin - Append elements of a string array together
strsplit - Split string at delimiter
strtrim - Remove whitespace

Example:
CHR = 'Four score and seven years ago';
string(CHR)

returns

"Four score and seven years ago"

Example:
C = {'Four score and seven equals';87};
string(C)

returns

"Four score and seven equals"


"87"

Example:
STR = ["Mercury","Gemini"];
STR(2,1) = 'Apollo'
returns

"Mercury" "Gemini"
"Apollo" <missing>

Example:
STR = ["Mercury","Gemini","Apollo"];
STR == 'Apollo'

returns

0 0 1

See also strlength, isstring, char, cellstr, strings

Reference page for string


Other functions named string

help varargin

varargin Variable length input argument list.


Allows any number of arguments to a function. The variable
varargin is a cell array containing the optional arguments to the
function. varargin must be declared as the last input argument
and collects all the inputs from that point onwards. In the
declaration, varargin must be lowercase (i.e., varargin).

For example, the function,

function myplot(x,varargin)
plot(x,varargin{:})

collects all the inputs starting with the second input into the
variable "varargin". MYPLOT uses the comma-separated list syntax
varargin{:} to pass the optional parameters to plot. The call,

myplot(sin(0:.1:1),'color',[.5 .7 .3],'linestyle',':')

results in varargin being a 1-by-4 cell array containing the


values 'color', [.5 .7 .3], 'linestyle', and ':'.

See also varargout, nargin, nargout, inputname, function, lists, paren.

Reference page for varargin

You might also like