【问题标题】:How to split strings with two chars ('||') [duplicate]如何用两个字符('||')分割字符串[重复]
【发布时间】:2016-01-28 12:18:15
【问题描述】:
otherMatchArray= "March | Monday | Tuesday|| December | Wednesday | Friday"


string[] matchData = otherMatchArray.Split('||');

如何拆分一个字符串,然后使用 || 再次拆分它和 | ?

【问题讨论】:

标签: c# split


【解决方案1】:
    string[] matchData = otherMatchArray.Split(new string[] { "||" }, StringSplitOptions.None); 

【讨论】:

    猜你喜欢
    • 2015-10-18
    • 2020-01-26
    • 2018-07-30
    • 1970-01-01
    • 1970-01-01
    • 2022-09-28
    • 1970-01-01
    • 2014-02-26
    相关资源
    最近更新 更多