ICT Strings
ICT Strings
WHAT IS A STRING?
A
string is considered as
a sequence or series of
characters and treated as
a single data item.
Strings
are used in
programs to store
and process text data
manipulation.
BASIC STRING
FUNCTIONS
getch()
a
Syntax:
gets(string_var);
puts()
a
strlen()
this
function returns
the length of the string.
Syntax: strlen(string);
strcpy()
this
strcat()
this
string
function
concatenates the strings. It
appends (add/join) string2 to
the end of string1.
Syntax:
strcat(str1, str2);
strlwr()
this
string
function
converts all the uppercase
letter
in
string
to
lowercase.
Syntax: strlwr(str);
strupr()
this
strrev()
this
string function
reverses all the characters
in the string.
Syntax: strrev(str);
strcmp()
this
strcmp()
Syntax:
strcmp(str1,str2);
strcmpi()
this
Syntax:
strcmpi(str1,str2);
strncpy()this
toupper()
this
Syntax:
toupper(vletter):
tolower()
this
Syntax:
tolower(vletter);