c# - Formating a string without having to make countless manipulations -
while parsing through html web document, end having strings might this:
"blades of steel \n \n \n \n \ntypical - situation \n 28\n 347\n \n $8.47 \n \n1234567891011121314151617181920212223242526272829303132"
all want in string values:
- a string "blades of steel"
- an int value $8.47
how parse through string without having multiple string.replace
or string.split
?
if know format can this:
string first = yourstring.split('\n')[0]; //blades of steel string second = yourstring.split('\n')[9]; //$8.47
Comments
Post a Comment