"-" on Strings revisited

This forum is meant for questions and discussions about the X# language and tools
Post Reply
FFF
Posts: 1580
Joined: Fri Sep 25, 2015 4:52 pm
Location: Germany

"-" on Strings revisited

Post 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 ;)
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
User avatar
Chris
Posts: 4906
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

"-" on Strings revisited

Post 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 :)
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
Post Reply