I have word-wrapping disabled in Xcode and I try to limit every line to 120 characters. But what can I do when I have a really long string that breaks this limit? I can't find a clean way to wrap it to a new line in Xcode without creating multiple strings.
Since you are using the Swift tag, I'll assume you're programming in swift.
Swift supports multiline strings like this:
var about: String = """
My name is Adam.
I am a software developer.
"""
This will include a newline character at the end of each line. To remove the newline character add a \ to the end of the line.
Example:
var about: String = """
My name is Adam. \
I am a software developer.
"""
Swift Reference for Multiline Strings
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With