Honesty Rocks! truth rules.

String Library Functions A few questions

HOME      >>       Programming

NelsonTR4N

Hi everyone, I have a NEW questionI am learning about strings and I don't understand what some string functions are...strcpy()strcat()strcmp() andstrlen()"C++ Beginner's Guide by Herbert Schildt" explained what the functions do but I am still confused. I read the functions many times and looked up examples...If you can explain what each of them are and do, I would be grateful.Thanks in advance!


xboxrulz1405241485

This is discussed at my college's website. Hopefully it would be useful:
https://scs.senecac.on.ca/~btp100/pages/content/sfunc.html

xboxrulz


darasen

That is a good resource xboxrulz, thanks for sharing it with us.To the OP, perhaps if you let us know where it is that you are losing comprehension we can assist you better.


yordan

I suppose that you already know that you usestrcpy() for copying a string from somewhere to somewhere else in your programstrcat() for displaying a string strcmp() for comparing two strings.strlen() for knowing the size of a string.


magiccode91405241511

In addition to these functions. There are other set of functions do the same thing but add one more parameter.They are strncpy(), strncat() and strncmp()It will allowed control how many chars to copy.