HOME       >>       Programming

String Library Functions A few questions


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.



VIEW DESKTOP VERSION REGISTERGET FREE HOSTING

Xisto.com offers Free Web Hosting to its Members for their participation in this Community. We moderate all content posted here but we cannot warrant full correctness of all content. While using this site, you agree to have read and accepted our terms of use, cookie and privacy policy. Copyright 2001-2019 by Xisto Corporation. All Rights Reserved.