# Is String function family inherently dangerous?

**URL:** <https://forum.arduino.cc/t/is-string-function-family-inherently-dangerous/559303>\
**Category:** Programming\
**Created:** [November 29, 2018, 5:17am UTC](https://forum.arduino.cc/t/is-string-function-family-inherently-dangerous/559303 "2018-11-29T05:17:21Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![KASSIMSAMJI](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/kassimsamji/32/261751_2.png) [@KASSIMSAMJI](https://forum.arduino.cc/u/KASSIMSAMJI)\
**Post date:** [November 29, 2018, 7:41am UTC](https://forum.arduino.cc/t/is-string-function-family-inherently-dangerous/559303/11 "2018-11-29T07:41:29Z")

</div>

> sherzaad:  
> I think that is the keypoint. Rather than saying "String is Evil on Arduino", I think if a general rule like  
> "_if dynamic memory used is more than x% of total memory available then String is not advisable_"  
> it would be more useful.
> 
> but how to define 'x' is beyond me...

i am pretty sure 'x' should be 50 or less then you are way safer, actually i have couple of projects on site running on Arduino Mega 2560, with bunch of Strings in it, dynamic mem. reads 30% upon compiling and never had issues for months (6+) now while being on site

played with couple of ESP8266 , never used a single char pointer/array in it and the dynamic mem. reads 31% upon compiling, bunch of bunch of Strings are in there and never had issues with it

I once tried to go for 'string' ( lower case 's' ) in nano+sim800L related project , tested it with 'receiving sms' and displayed it on serial monitor' which worked pretty well for couple of minutes , then , sms was displayed truncated , in short the use of 'string' was not that reliable at all, i gave up,went back to old time friend 'String'

---

_[View the full topic](https://forum.arduino.cc/t/is-string-function-family-inherently-dangerous/559303)._
