Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
Extract all possible substrings from a string
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { string value = "rstuvwxyz"; // Avoid full length. for (int length = 1; length < value.Length; length++) { // End index is tricky. for (int start = 0; start <= value.Length - length; start++) { string substring = value.Substring(start, length); Console.WriteLine(substring); } } } } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
pared 1
enum extension
SceneGraph Interviewee Task
Fórum ➡ Aggregating 2 compatible dictionaries, using LINQ ♦
a
No repeat test
Delegaty
Сортировка массива
confronta liste di stringhe
Covariance & Contravariance
Please log in to post a comment.