C# split string of first character occurrence -


i thought simple kicking butt.

i have string 21. a.person want a.person out of this.

i try following 21

string[] pname = values[i, j].tostring().split(new char[] { '.' }, 2); pname[1] ??? 

values[i, j].tostring() = 21. a.person , yes i've verified this.

everyone giving alternate solutions when yours should work. problem values[i, j] must not equal 21. a.person

i plugged simple test..

    [test]     public void junk()     {         string[] pname = "21. a.person".split(new char[] { '.' }, 2);         console.writeline(pname[1]);     } 

what print? a.person (with space in front, because didn't trim space)


Comments

Popular posts from this blog

wireshark - USB mapping with python -

c++ - nodejs socket.io closes connection before upgrading to websocket -

Deploying Qt Application on Android is really slow? -