Created
October 22, 2015 08:33
-
-
Save windwp/2152997763e295de1428 to your computer and use it in GitHub Desktop.
substring linqpath
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Main() | |
{ | |
var url="http://google.com"; | |
var startPos=url.IndexOf("chuong-")+7; | |
startPos.Dump(); | |
var endPos=url.IndexOf("-",url.IndexOf("chuong-")+7)-startPos; | |
endPos.Dump(); | |
var result=url.Substring(startPos,endPos); | |
result.Dump(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment