Getting Substrings of a given string

Download c# eBook

Example

string helloWorld = "Hello World!";
string world = helloWorld.Substring(6); //world = "World!"
string hello = helloWorld.Substring(0,5); // hello = "Hello"

Substring returns the string up from a given index, or between two indexes (both inclusive).

Stats

Contributors: 3
2015-12-10
Licensed under: CC-BY-SA

Not affiliated with Stack Overflow
Rip Tutorial: info@zzzprojects.com

Download eBook