Real simple question... for good programmers

Enjoys Math enjoysmath at gmail.com
Sat Oct 22 22:20:21 UTC 2022


__MWE Code:__
```
module DlangForumsMWE;

import std.stdio;
import std.algorithm.mutation;

int main()
{
    //string[] tokens = userSID.output.split!isWhite;
    //writeln("tokens = ", tokens);

    auto tokens = ["SID", "", "", "", "", "", "", "", "", "", "", 
"", "", "", "", "", "", "", "", "", "", "",
                   "", "", "", "", "", "", "", "", "", "", "", "", 
"", "", "", "", "", "", "", "", "", "", "",
                   "", "", "", 
"S-1-5-21-3823976785-3597194045-4221507747-1779", "", "", "", "", 
"", "", "", ""];

    writeln("Before:\n", tokens);

    writeln();
    tokens = tokens.remove!(x => x == "");
    writeln("After:\n", tokens);

    readln();
    return 0;
}
```

__Outputs:__
```
Before:
["SID", "", "", "", "", "", "", "", "", "", "", "", "", "", "", 
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", 
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", 
"", "S-1-5-21-3823976785-3597194045-4221507747-1779", "", "", "", 
"", "", "", "", ""]

After:
["SID", "S-1-5-21-3823976785-3597194045-4221507747-1779"]
```




More information about the Digitalmars-d-learn mailing list