Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
all possible sub strings of a given 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 { //all possible substrings of a given string public static void Main(string[] args) { string str ="abcxyz"; int n = str.Length; for (int i = 0; i <= n-1; ++i) { string subString = ""; for (int j = i; j <= n-1 ; ++j) { subString = subString + (str[j]); Console.Write(subString + " "); } } } } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
sleep thread
Main 5.4
CODE
eg
Intuit // C# // listing_4.6 (Shooting on the target)
Find duplicated values in a list
Regex - Leading zeros
Ventmatika testas
little problem
Testing 008
stackse - search stackoverflow differently
Please log in to post a comment.