d分割并合并

import std;
//分割器.

auto foo(string s, string sp, string j) @nogc {
    return s.splitter(sp).map!only.joiner(only(j));
}

void main() {
    foo("ab,cd,ef,gh", ",", "##").writeln;
}

合并并连接.

posted @ 2021-07-08 09:50  zjh6  阅读(19)  评论(0)    收藏  举报  来源