strchr

How to get a char* pointer to a C++ string?

I have a C++ string. I need to pass this string to a function accepting char* parameter, for example - strchr(). a) How do I get that pointer? b) Is there some funtion equivalent to strschr() that works for C++ strings? ...

In C how do I find the index of a character within a string?

Suppose I have a string "qwerty" and I wish to find the index position of character e in it. How do I do it in C? (In this case the index would be 2) I found strchr function but that returns a pointer to the character and not the index. Please help me out! Thanks, Boda Cydo. ...

Efficient memcspn

Does anyone know of an efficient implementation of a memcspn function?? It should behave like strcspn but look for the span in a memory buffer and not in a null terminated string. The target compiler is visualC++ . Thanks, Luca ...