I have a variable tweet
that is a string and it has a character at the very beginning that I want to clip off.
So what I want to do is use strstr()
to remove it. Here's my code:
tweet = strstr(tweet, "]");
However, I get this error:
cannot convert 'String' to 'const char*' for argument '1' to
'char' strstr(const char*, const char*)
So my thought would be to convert tweet
into a char. How would I go about doing so?
string
has a c_str()
member function that returns const char *
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With