Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

Split String

public List<string> ArrayFromString(string str)
{
    var sb = new StringBuilder();
    var ls = new List<string>();
    for (int i = 0; i < str.Length; i++)
    { 
        if(str[i]>=65 && str[i]<=90 || str[i]>=97 && str[i]<=122) 
          sb.Append(str[i]);
        else
        {
            if(sb.Length>0) 
              ls.Add(sb.ToString());
            sb.Clear();
        }
    }
    if(sb.Length>0)
    {
      	ls.Add(sb.ToString());
    }
    return ls;
}
Source by www.delftstack.com #
 
PREVIOUS NEXT
Tagged: #Split #String
ADD COMMENT
Topic
Name
3+8 =