一、中英文转换
1、安装NPinYin

2、编写代码
1 | string str = "这里是测试的中文字符串"; |
3、运行效果

二、去空格
1、编写代码
1 | string strWithSpaces = " this is a test string with spaces "; |
2、运行效果

三、中文转英文 + 去掉空格
1、编写代码
1 | string str = "这里是测试的中文字符串"; |
2、运行效果

参考链接
遇到此问题做此记录,如有帮助,欢迎点赞关注收藏!

1 | string str = "这里是测试的中文字符串"; |

1 | string strWithSpaces = " this is a test string with spaces "; |

1 | string str = "这里是测试的中文字符串"; |

遇到此问题做此记录,如有帮助,欢迎点赞关注收藏!
.net core 读取配置文件的几种方式
【加班但也开心的一天】