# How do i split a string to start on new line?

**URL:** <https://forums.unrealengine.com/t/how-do-i-split-a-string-to-start-on-new-line/332657>\
**Category:** UI\
**Tags:** string, text, unreal-engine, file, CPP, question\
**Created:** [September 18, 2015, 3:35pm UTC](https://forums.unrealengine.com/t/how-do-i-split-a-string-to-start-on-new-line/332657 "2015-09-18T15:35:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_adc3f730](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_adc3f730](https://forums.unrealengine.com/u/anonymous_user_adc3f730)\
**Post date:** [September 18, 2015, 3:35pm UTC](https://forums.unrealengine.com/t/how-do-i-split-a-string-to-start-on-new-line/332657/1 "2015-09-18T15:35:30Z")

</div>

How do i get a string to start on a new line on output, \n and  
doesn’t work and i need it for C++ not ‘shift + enter’ in Blueprint

---

<div class="post-metadata">

**Author:** ![Nsomnia](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nsomnia](https://forums.unrealengine.com/u/Nsomnia)\
**Post date:** [September 21, 2015, 5:15pm UTC](https://forums.unrealengine.com/t/how-do-i-split-a-string-to-start-on-new-line/332657/2 "2015-09-21T17:15:02Z")

</div>

AFAIK there is no way to do it within the line. \n and /n dont work,  
doesnt work.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_adc3f730](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_adc3f730](https://forums.unrealengine.com/u/anonymous_user_adc3f730)\
**Post date:** [September 23, 2015, 12:49pm UTC](https://forums.unrealengine.com/t/how-do-i-split-a-string-to-start-on-new-line/332657/3 "2015-09-23T12:49:23Z")

</div>

I fixed my problem by using the shift + enter method in blueprint and sending that string to my code but as i was doing that i found that if i copied the BP node an pasted it in test i got this in between the lines " \r\ " i haven’t tried it but maybe that is the new \n.

---

<div class="post-metadata">

**Author:** ![Rama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rama/32/882413_2.png) [@Rama](https://forums.unrealengine.com/u/Rama)\
**Post date:** [October 1, 2015, 5:48am UTC](https://forums.unrealengine.com/t/how-do-i-split-a-string-to-start-on-new-line/332657/4 "2015-10-01T05:48:57Z")

</div>

#Solution

UE4 has a macro called LINE\_TERMINATOR, globally accessible.

You can use that where you’d normally use ‘\n’ to get the desired result

#❤

Rama

---

<div class="post-metadata">

**Author:** ![dmitrij2026](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dmitrij2026](https://forums.unrealengine.com/u/dmitrij2026)\
**Post date:** [August 21, 2019, 10:53am UTC](https://forums.unrealengine.com/t/how-do-i-split-a-string-to-start-on-new-line/332657/5 "2019-08-21T10:53:37Z")

</div>

Use to translate to a new line “\r”. Work with FText.

---

<div class="post-metadata">

**Author:** ![nande](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nande/32/1057698_2.png) [@nande](https://forums.unrealengine.com/u/nande)\
**Post date:** [January 3, 2025, 5:18am UTC](https://forums.unrealengine.com/t/how-do-i-split-a-string-to-start-on-new-line/332657/6 "2025-01-03T05:18:03Z")

</div>

> [@How do i split a string to start on new line? "\\n" not working! (Simple Question)](https://forums.unrealengine.com/t/how-do-i-split-a-string-to-start-on-new-line-n-not-working-simple-question/42120/11):
>
> in cpp on 5.5 there is ParseIntoArrayLines for FStrings beware of the warning about using it for short strings
