English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The functionstrxfrm()
Converts the source string to the current locale and copies the first character count of the converted string to the destination. Declared in the C language "locale.h" header file.
This isstrxfrm()
C language syntax,
size_t strxfrm(char *destination, const char *source, size_t number)
Here,
destination-The destination pointer to which the characters are copied.
source-The string to be converted.
number-The number of characters to be copied.
This isstrxfrm()
C language example,
#include <stdio.h> #include <string.h> int main () has { char s[10] = "HelloWorld"; char d[10]; int n; n = strxfrm(d, s, 5); printf("Length of string : %d", n); return(0); }
Output result
Length of string : 10
In the above program, two char type arrays are declared. One is the destination, and the other is the source. It will copy the converted character set from the source to the destination. It will only copy "n" characters.
char s[10] = "HelloWorld"; char d[10]; int n; n = strxfrm(d, s, 5);