c# - how do you get a substring inside another text? -
i have text format:
name: last name: birthday: years old: parent: school:
and have next information..
name:name1 last name:lastname1 birthday:13/03/1991 years old:20 parent:fatherx school:university x
how get:
name1 lastname1 13/03/1991 20 fatherx university x
...for different variables? dont forget user sometime dont have information example have empty
parent:
split
on colon. example, if had each 1 of lines stored in seperate string, following e.g.
string s = "name:angel rodrigo"; string name= s.split(':')[1]; // after colon
Comments
Post a Comment