xsharp.eu • "-" on Strings revisited
Page 1 of 1

"-" on Strings revisited

Posted: Fri Sep 20, 2019 7:01 pm
by FFF
Just found, that in the meanwhile the minus operator from Vo is also in X#/Vo dialect. Great.
For those, who don't know it:

Code: Select all

local x := "asdf      "  as String
local y := "1234   "  as String
? x-y    // "asdf1234"   //note: Slen(x) + Slen(y) = Slen(x-y), the blanks are sorted in at the end.
I didn't find this in the docs...
One caveat: Vo-help says "Concatenate without intervening spaces" this is NOT quite true, if you add LEADING blanks to y, they will stay in the result. But the behaviour is ident in X# and Vo, so no complaint ;)

"-" on Strings revisited

Posted: Fri Sep 20, 2019 9:22 pm
by Chris
Hi Karl,
FFF wrote:But the behaviour is ident in X# and Vo, so no complaint ;)
Most probably this was not down to pure luck :)