Question: Write these cString functions in C++ without using Cstring library. StrLen (of a cstring) StrCpy (destination cstring, source cstring) StrCat (destination cstring, source cstring) SubStr
Write these cString functions in C++ without using Cstring library.
StrLen(of a cstring)
StrCpy(destination cstring, source cstring)
StrCat(destination cstring, source cstring)
SubStr(source cstring, start pos, length, sub cstring);
StrCmp(this cstring, that cstring) //returns 1, 0, or -1 (see description of strcmp)
StrChr(cstring, character) //return the index of character in cstring
StrRChr(cstring, character) //search in reverse for character in cstring
StrNCpy( destination cstring, source cstring, num of characters to copy)
StrNCat( destination cstring, source cstring, num of characters to concatenate)
StrNCmp(this string, that string, n: max characters to compare) //compare at most n characters
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
