Conditional word wrapping
I have a long list of name (Firstname and Lastname). Beetwen this names is a ", " for easy reading. The list of names is different long. Sometimes 3 oder 4 name - from time to time it can be that we have 20 name in the list.
Exampel: John Doe, Jane Doe, Peter Pan, Paul Peter
Now i have a textfield. When the list is so long, that it not fit in one line, then splitet in two or more lines. That it fine - but sometime it split in the name - not at the end of the name (the end of the Name is the ,)
The result is :
John Doe, Jane Doe, Peter
Pan, Paul Peter
How can i configure that the wrapping to next line is only when a "," is the last charater
What I want:
John Doe, Jane Doe,
Peter Pan, Paul Peter
This discussion has been closed.
Comments
Hello!
To ensure that WordWrap in TextObject wraps names in their entirety, replace the space within the ‘First name Surname’ pair with a non-breaking space \u00A0 ( ), whilst leaving a normal space after the full stop. For example:
[string.Join(‘, ’, [Data.Names].Split(“,”).Select(p => p.Trim().Replace(‘ ’, ‘\u00A0’)))]