# Does the FString have a length limit?

**URL:** <https://forums.unrealengine.com/t/does-the-fstring-have-a-length-limit/410298>\
**Category:** C++\
**Tags:** fstring, unreal-engine, UE4, CPP, question\
**Created:** [November 22, 2017, 10:42am UTC](https://forums.unrealengine.com/t/does-the-fstring-have-a-length-limit/410298 "2017-11-22T10:42:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_8fbf1ec1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_8fbf1ec1](https://forums.unrealengine.com/u/anonymous_user_8fbf1ec1)\
**Post date:** [November 22, 2017, 10:42am UTC](https://forums.unrealengine.com/t/does-the-fstring-have-a-length-limit/410298/1 "2017-11-22T10:42:40Z")

</div>

Does the FString have a length limit?

---

<div class="post-metadata">

**Author:** ![Memnarch](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Memnarch](https://forums.unrealengine.com/u/Memnarch)\
**Post date:** [November 22, 2017, 11:06am UTC](https://forums.unrealengine.com/t/does-the-fstring-have-a-length-limit/410298/2 "2017-11-22T11:06:52Z")

</div>

Ofcourse it does, but i doubt you’ll reach it anytime soon with a normal game. “Len” returns the length as Int32(which is a little flaw in my opinion since length/size can not be smaller than 0). Deriving from it, that it supports the full 31 Bits of the positive space of Int32, you can create a string with up to 2.147.483.647 characters. IIRC a TChar is 1 Byte, this means a FString of roughly 2GB(!). Nothing beyond this is possbile, because otherwhise Int32 will flip to negative value.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_8fbf1ec1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_8fbf1ec1](https://forums.unrealengine.com/u/anonymous_user_8fbf1ec1)\
**Post date:** [November 22, 2017, 11:14am UTC](https://forums.unrealengine.com/t/does-the-fstring-have-a-length-limit/410298/3 "2017-11-22T11:14:21Z")

</div>

em,that is exactly the same as the string in java.Thanks a lot.
