且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用c#将长字符串分成两部分

更新时间:2022-11-17 12:30:19



使用substring调用将字符串拆分为给定的索引。

例如:

Hi,
use the substring call to split the string at a given index.
for example:
string str = "780955" //780,955.00
string thousands = str.Substring(0, str.Length - 3);
string hundards = str.Substring(thousands.Length);





希望这会有所帮助。



问候

Jegan



Hope this helps.

Regards
Jegan