How to use strip or stripRight on char[len] ? Thanks.

FrankLike 1150015857 at qq.com
Thu Feb 22 16:55:14 UTC 2018


Hi,everyone,
How to use strip or stripRight on char[len]?

For example:

string abcs ="aabc    ";
auto abcsaa = abcs.stripRight;
writeln(abcsaa);
writeln("---abcsaa--stripRight ok---- ");


  char[100] abc ="aabc    ";
  auto abcaa = ((abc).dup).stripRight;
  writeln(abcaa);
writeln("----stripRight error----- ");

Where is error? Thanks.


More information about the Digitalmars-d-learn mailing list