parsing_data/quickref.tex
author Puneeth Chaganti <punchagan@fossee.in>
Wed, 10 Nov 2010 13:25:46 +0530
changeset 438 4523b2048663
parent 331 e3136f576acb
permissions -rw-r--r--
Reviewed conditionals LO.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
331
e3136f576acb Finished parsing_data
Nishanth <nishanth@fossee.in>
parents: 238
diff changeset
     1
Splitting a string on whitespace:\\
e3136f576acb Finished parsing_data
Nishanth <nishanth@fossee.in>
parents: 238
diff changeset
     2
{\ex \lstinline|    str_var.split()|}
238
c507e9c413c6 Converted the parsing_data into new template form
Nishanth <nishanth@fossee.in>
parents:
diff changeset
     3
331
e3136f576acb Finished parsing_data
Nishanth <nishanth@fossee.in>
parents: 238
diff changeset
     4
Splitting a string using a delimiter. Ex: ";" :\\
e3136f576acb Finished parsing_data
Nishanth <nishanth@fossee.in>
parents: 238
diff changeset
     5
{\ex \lstinline|    str_var.split(";")|}
238
c507e9c413c6 Converted the parsing_data into new template form
Nishanth <nishanth@fossee.in>
parents:
diff changeset
     6
331
e3136f576acb Finished parsing_data
Nishanth <nishanth@fossee.in>
parents: 238
diff changeset
     7
Stripping the whitespace around a string:\\
e3136f576acb Finished parsing_data
Nishanth <nishanth@fossee.in>
parents: 238
diff changeset
     8
{\ex \lstinline|    str_var.strip()|}
238
c507e9c413c6 Converted the parsing_data into new template form
Nishanth <nishanth@fossee.in>
parents:
diff changeset
     9
331
e3136f576acb Finished parsing_data
Nishanth <nishanth@fossee.in>
parents: 238
diff changeset
    10
Converting a string or float to int:\\
e3136f576acb Finished parsing_data
Nishanth <nishanth@fossee.in>
parents: 238
diff changeset
    11
{\ex \lstinline|    int(var_name)|}
e3136f576acb Finished parsing_data
Nishanth <nishanth@fossee.in>
parents: 238
diff changeset
    12
e3136f576acb Finished parsing_data
Nishanth <nishanth@fossee.in>
parents: 238
diff changeset
    13
Converting a string or int into float:\\
e3136f576acb Finished parsing_data
Nishanth <nishanth@fossee.in>
parents: 238
diff changeset
    14
{\ex \lstinline|    float(var_name)|}
e3136f576acb Finished parsing_data
Nishanth <nishanth@fossee.in>
parents: 238
diff changeset
    15