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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started