Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

All Possible SubString of string

public static List<string> SubString(String str)
{
  var list = new List<string>();
  for (int i = 0; i < str.Length; i++)
  {
    for (int j = 1; j <= str.Length - i; j++)
    {
      list.Add(str.Substring(i, j));
    }
  }
  return list;
}
 
PREVIOUS NEXT
Tagged: #All #Possible #SubString #string
ADD COMMENT
Topic
Name
6+7 =