Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

All 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 #Substring #String
ADD COMMENT
Topic
Name
8+4 =