Strings are used in string handling operations such as,
- Counting the length of a string.
- Comparing two strings.
- Copying one string to another.
- Converting lower case string to upper case.
- Converting upper case string to lower case.
- Joining two strings.
- Reversing string.
STRINGS STANDARD FUNCTION:-
----------------------------------------------
strlen():-determines length of a string.
strcpy():-copy a string from source 2 destination.
strncpy():-copy achars of a string 2 another string up 2 specified length.
strcmp():-compares 2 strings(depends on b/w small & capital).
stricmp():-compares 2 strings(doesn't depends upon b/w small & capital).
strncmp():-compares 2 strings of specified lengtgh.
strnicmp():-compares 2 strings(doesn't depends upon b/w small & capital)of specified lengtgh.
strlwr():-converts uppercase string 2 lowercase string.
strupr():-converts lowercase string 2 uppercase string.
strdup():-duplicate a string.
strchr():-determines 1st occurance of a given char in a string.
strrchr():-determines lost occurance of a given char in a string.
strstr():-determines 1st occurance of a given string in another string.
strcat():-appends source string 2 destination string.
strncat():-appends source string 2 destination string upto specified length.
strrev():-reverse all charecters of astring.
strset():-sets all chars of astring with a given argument or symbol.
strnset():-sets all chars of astring with a given argument or symbol upto specified length.
strspn():-finds upto what length two strings are identical.
0 comments:
Post a Comment