_mbsspn
- Updated2023-02-21
- 1 minute(s) read
_mbsspn
size_t _mbsspn (const char stringToSearch[], const char characterSet[]);
Purpose
The function returns the length in bytes of the initial segment of a string that contains only characters from the specified set of characters. It calculates this length by locating the position of the first character that is not in the specified set.
Refer to the Programming for Multibyte Character Sets in LabWindows/CVI topic for information about working with multibyte character sets.
Parameters
Input | ||
Name | Type | Description |
stringToSearch | const char [] | Contains a pointer to the string that is searched to locate a character not in characterSet. |
characterSet | const char [] | Contains a pointer to the character set containing the characters that are searched for in the specified string. |
Return Value
Name | Type | Description |
matchedCharIndex | size_t | Contains the index value of the first character that does not match any in the specified character set. This value also corresponds to the length in bytes of the segment of the string that contains only characters from the character set. If all characters in the string are also in the character set, the function returns the index of the terminating ASCII NUL byte. |
Additional Information
Library: ANSI C Library
Include file: ansi_c.h
LabWindows/CVI compatibility: LabWindows/CVI 6.0 and later