Monday 27 August 2012

Before & after items after split a string


Before split string


       string input = TextBox1.Text;
        int index = input.LastIndexOf("@");
               or-  int index = input.IndexOf("@");
        if (index > 0)
        input = input.Substring(0, index);
        resporse.write=input;



After split strings



string input = TextBox1.Text;
        response.write = input.Split('@').Last();

No comments:

Post a Comment

Excel Sort values in ascending order using function TEXTJOIN

 Excel ::  Text ::  1,3,5,2,9,5,11 Result :: 1,2,3,5,5,9,11 Formula ::     TEXTJOIN ( ",",1,SORT(MID(SUBSTITUTE( A1 ,","...