![]() |
C - Entwicklung Bibliotheks-Funktionen: 1 String RW Homepage von PS-Trainer - C-Entwicklung - Strings - an PS-Trainer |
|
| Strings & characters | Overview |
| _strnset, _wcsnset, _mbsnset | Initialize characters of a string. |
| _strset, _wcsset, _mbsset | Set characters of a string to a character. |
| _strupr, _wcsupr, _mbsupr | Convert a string to uppercase. |
| _strlwr,
_wcslwr, _mbslwr |
Convert a string to lowercase. |
| _strrev, _wcsrev, _mbsrev | Reverse characters of a string. |
|
_strlwr, _wcslwr,
_mbslwr
Remarks The _strlwr function converts any uppercase letters in string to lowercase as determined by the LC_CTYPE category setting of the current locale. Other characters are not affected. For more information on LC_CTYPE, see setlocale. The _wcslwr and _mbslwr functions are wide-character and multibyte-character versions of _strlwr. The argument and return value of _wcslwr are wide-character strings; those of _mbslwr are multibyte-character strings. These three functions behave identically otherwise. Generic-Text Routine Mappings
Subject: String Manipulation Routines, Locale Routines Keywords: See also _strupr |
||||||||||||||||||||||||
| Return Value Each of these functions returns a pointer to the converted string. Because the modification is done in place, the pointer returned is the same as the pointer passed as the input argument. No return value is reserved to indicate an error. Parameter
|
||||||||||||||||||||||||
|
Example #include <string.h> void main( void ) |
| _strupr, _wcsupr,
_mbsupr Convert a string to uppercase. char *_strupr( char *string ); wchar_t *_wcsupr( wchar_t *string ); unsigned char *_mbsupr( unsigned char *string );
Remarks The _strupr function converts, in place, each lowercase letter in string to uppercase. The conversion is determined by the LC_CTYPE category setting of the current locale. Other characters are not affected. For more information on LC_CTYPE, see setlocale. _wcsupr and _mbsupr are wide-character and multibyte-character versions of _strupr. The argument and return value of _wcsupr are wide-character strings; those of _mbsupr are multibyte-character strings. These three functions behave identically otherwise. Generic-Text Routine Mappings
Subject: Locale Routines | String Manipulation Routines Keywords: See Also _strlwr |
||||||||||||||||||||||||
| Return Value These functions return a pointer to the altered string. Because the modification is done in place, the pointer returned is the same as the pointer passed as the input argument. No return value is reserved to indicate an error. Parameter
|
||||||||||||||||||||||||
|
Example #include <string.h> void main( void ) |
| _strset, _wcsset,
_mbsset Set characters of a string to a character. char *_strset( char *string, int c ); wchar_t *_wcsset( wchar_t *string, wchar_t c ); unsigned char *_mbsset( unsigned char *string, unsigned int c );
Remarks The _strset function sets all the characters of string to c (converted to char), except the terminating null character. _wcsset and _mbsset are wide-character and multibyte-character versions of _strset. The data types of the arguments and return values vary accordingly. These three functions behave identically otherwise. Generic-Text Routine Mappings
Subject: String Manipulation Routines Keywords: See Also _mbsnbset, memset, strcat, strcmp, strcpy, _strnset |
||||||||||||||||||||||||
| Return Value Each of these functions returns a pointer to the altered string. No return value is reserved to indicate an error. Parameters
|
||||||||||||||||||||||||
|
Example #include <string.h> void main( void ) |
| _strrev, _wcsrev,
_mbsrev Reverse characters of a string. char *_strrev( char *string ); wchar_t *_wcsrev( wchar_t *string ); unsigned char *_mbsrev( unsigned char *string );
Remarks The _strrev function reverses the order of the characters in string. The terminating null character remains in place. _wcsrev and _mbsrev are wide-character and multibyte-character versions of _strrev. The arguments and return value of _wcsrev are wide-character strings; those of _mbsrev are multibyte-character strings. For _mbsrev, the order of bytes in each multibyte character in string is not changed. These three functions behave identically otherwise. Generic-Text Routine Mappings
Subject: String Manipulation Routines Keywords: See Also strcpy, _strset |
||||||||||||||||||||||||
| Return Value Each of these functions returns a pointer to the altered string. No return value is reserved to indicate an error. Parameter
|
||||||||||||||||||||||||
|
Example #include <string.h> void main( void ) printf( "Input a string
and I will tell you if it is a palindrome:\n" ); /* Reverse string and compare
(ignore case): */ |
| _strnset, _wcsnset,
_mbsnset Initialize characters of a string to a given format. char *_strnset( char *string, int c, size_t count ); wchar_t *_wcsnset( wchar_t *string, wchar_t c, size_t count ); unsigned char *_mbsnset( unsigned char *string, unsigned int c, size_t count );
Remarks The _strnset function sets, at most, the first count characters of string to c (converted to char). If count is greater than the length of string, the length of string is used instead of count. _wcsnset and _mbsnset are wide-character and multibyte-character versions of _strnset. The string arguments and return value of _wcsnset are wide-character strings; those of _mbsnset are multibyte-character strings. These three functions behave identically otherwise. Generic-Text Routine Mappings
Subject: String Manipulation Routines Keywords: See Also strcat, strcmp, strcpy, _strset |
||||||||||||||||||||||||
| Return Value Each of these functions returns a pointer to the altered string. Parameters
|
||||||||||||||||||||||||
|
Example #include <string.h> void main( void ) |
| Aktuelle Daten dieser Seite | Letzte Änderung: |
| |