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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!