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

FrankLike 1150015857 at qq.com
Thu Feb 22 17:44:53 UTC 2018


On Thursday, 22 February 2018 at 16:59:40 UTC, Adam D. Ruppe 
wrote:
> On Thursday, 22 February 2018 at 16:55:14 UTC, FrankLike wrote:
>>  char[100] abc ="aabc    ";
>>  auto abcaa = ((abc).dup).stripRight;
>
> try:
>
> auto abcaa = stripRight(abc[])

Now,I want to get the result:

  char[100] Path;
  writeln("will get path ");
  SHGetSpecialFolderPath(NULL,cast(char*)Path.ptr,CSIDL_DESKTOP,0);

if use char[] Path;

It not get the result.

How to strip the Path? Thanks.


More information about the Digitalmars-d-learn mailing list