Question about the $ sign in arrays and strings

Namal sotis22 at mail.ru
Wed Feb 19 07:04:48 UTC 2020


Hello, I wanted to remove the lastchar in a string and figured 
that you can do that wit

str = str[0..$-2];

but why is

str = str[0..$] and str=str[0..$-1]

the same ?


More information about the Digitalmars-d-learn mailing list