Main Site Documentation

Trim does not work


This code does not work:

                tmp = "08:45:01";
                char[] trimchars = { ':', '/' };
                tmp = tmp.Trim(trimchars);

tmp is unchanged -> ( “08:45:01” )


Doesn’t Trim() eliminate leading and trailing characters?


That is correct (i am corrected). Trim does all leading AND trailing occurences. TrimStart does ALL leading occurences, TrimEnd does ALL trailing occurences.

The method I needed is Replace(’:’,’’), which is not included in TinyCLR (yet??)


Correct, replace is not present today.