strlength
Lengths of strings
Syntax
Description
Examples
Input Arguments
Tips
To find the length of the largest array dimension of
str, use thelengthfunction, notstrlength.
Algorithms
strlength counts the number of code units in text.
Code units are bit sequences for encoding characters of a character encoding system. In
some character encodings, such as UTF-16, there are some characters that are encoded
with multiple code units.
If you have a string or a character vector that contains such characters, then the number of code units is greater than the number of characters.
length(C) also returns the number of code
units when C is a character vector.
Extended Capabilities
Version History
Introduced in R2016b