本文介绍了分割字符串以获取结束字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的字符串是 字符串1 --->字符串2 --->字符串3 --->字符串4 --->字符串5 如何仅获取字符串"string1 ---> string2 ---> string3 ---> string"
My string is string1--->string2--->string3--->string4--->string5 how to get the string "string1--->string2--->string3--->string" only
推荐答案此处 [ ^ ]是有关C#中的字符串操作的链接.当您了解概念时,我相信您会弄清楚使用哪种方法.祝你好运. Here[^] is a link about string manipulation in C#. By the time you understand the concept, I''m sure you''ll figure out what method to use. Good luck.
在这里问不是一个好问题.您应该了解C#或VB.Net字符串操作.有很多方法可以实现这一目标. 顺便说一句,这是一个 Its not a good question to ask here. You should learn about C# or VB.Net string manipulation. There are many ways to achieve this. BTW here is one string str="string1--->string2--->string3--->string4--->string5"; str.Substring(1, str.LastIndexOf(">") - 5);
更多推荐
分割字符串以获取结束字符串
发布评论