【发布时间】:2018-01-21 03:33:48
【问题描述】:
我需要使用 C++/CLI 将任何不可打印的字符替换为八进制表示。有一些使用 C# 的示例需要 lambda or linq。
// There may be a variety of non printable characters, not just the example ones.
String^ input = "\vThis has internal vertical quote and tab \t\v";
Regex.Replace(input, @"\p{Cc}", ??? );
// desired output string = "\013This has internal vertical quote and tab \010\013"
这可以在 C++/CLI 中实现吗?
【问题讨论】: