String to multi-line string

Get help using Construct 2

Post » Tue Mar 20, 2018 8:57 pm

Hey everyone,

I have long strings in json, imported via Ajax. Iwant to have characters in the string to control the formatting, specifically linebreaks.

My approach atm:
Go through the array that I imported to and Replace the formatting character with the expression &newline&.
But of course I need to have quotes around the expression to interrupt the string and it to work as an expression.
how do I interrupt a string with expressions, including the quotes before and after?
B
18
S
9
Posts: 272
Reputation: 2,363

Post » Tue Mar 20, 2018 9:25 pm

Image

Tokenize your string by the newline character (in the image above I use \n); iterate through to tokenization to concat it back up with &newline at the end of each iteration.
B
56
S
20
G
1
Posts: 120
Reputation: 4,395

Post » Tue Mar 20, 2018 10:19 pm

@faulknermano Rad stuff! thanks
B
18
S
9
Posts: 272
Reputation: 2,363


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 5 guests