so I want to have a ‘message’ that contains a string which can contains (consecutive) spaces
I know that PD, treats ‘strings’ as a sequence of symbols.
so in the simple case, you can reinsert a space for every symbol
e.g. “a.lazy.fox” = [a] [lazy] [fox] , convert back , put a space after each.
( . = space, to get around discourse formatting issues )
but that doesn’t work if I was to allow consecutive spaces…
“a lazy…fox” , still is [a] [lazy] [fox], so translated back I only have one space
I know I could implement substitute the character, but thats a pain, since it means that character becomes unavailable for use.
context,
basically, Im writing parameters to the screen and want to right justify the numbers e.g.
|mix 50.7%|
|depth 3.0%|
so I pad the text with spaces to achieve the justification.
@oweno this ties into setScreenLine , basically, I want to send the entire LCD line in one go from PD.
I might be able to get around this (ive got a complex solution involving null symbols) , but perhaps for other users… if might be better to have an escape character thats understood by mother host.
e.g. ^s = space ^^ = ^
this way in PD its easy, you can just write “a^slazy^s^s^sfox” and you know you will get the correct spacing.
am i missing something, does PD have a better way to work with ‘strings’ that it wont break into symbols!