# Difference between String and string

**URL:** <https://forum.arduino.cc/t/difference-between-string-and-string/992653>\
**Category:** Programming\
**Created:** [May 17, 2022, 6:57am UTC](https://forum.arduino.cc/t/difference-between-string-and-string/992653 "2022-05-17T06:57:46Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![GolamMostafa](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/golammostafa/32/239011_2.png) [@GolamMostafa](https://forum.arduino.cc/u/GolamMostafa)\
**Post date:** [May 17, 2022, 9:19am UTC](https://forum.arduino.cc/t/difference-between-string-and-string/992653/11 "2022-05-17T09:19:53Z")

</div>

> [@Trying to read from serial and print "$101=152" if incoming serial string is = "red. Not working why?"](https://forum.arduino.cc/t/trying-to-read-from-serial-and-print-101-152-if-incoming-serial-string-is-red-not-working-why/992590/6):
>
> ` if (strstr(red.c_str(), "red") != NULL) {`

You have not explained the functioning of the strstr() function andd c\_str() method to the OP; so, it has not added much to his knowledgebase. You have not also reacted to the following comment @UKHeliBob.

> [@Trying to read from serial and print "$101=152" if incoming serial string is = "red. Not working why?"](https://forum.arduino.cc/t/trying-to-read-from-serial-and-print-101-152-if-incoming-serial-string-is-red-not-working-why/992590/10):
>
> In my opinion
> 
> ```arduino
> if (strstr(red.c_str(), "red") != NULL)
> 
> ```
> 
> is a bit too advanced for you at the moment

---

_[View the full topic](https://forum.arduino.cc/t/difference-between-string-and-string/992653)._
