gpt4 book ai didi

c# - 如何从字符串中去除非 ASCII 字符? (在 C# 中)

转载 作者:IT王子 更新时间:2023-10-29 03:29:32 24 4
gpt4 key购买 nike

如何从字符串中去除非 ASCII 字符? (在 C# 中)

最佳答案

string s = "søme string";
s = Regex.Replace(s, @"[^\u0000-\u007F]+", string.Empty);

关于c# - 如何从字符串中去除非 ASCII 字符? (在 C# 中),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/123336/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com