parsing_data/quickref.tex
author anand
Thu, 11 Nov 2010 00:03:57 +0530
changeset 472 fcdec2d28c9a
parent 331 e3136f576acb
permissions -rw-r--r--
Checklist OK for `The other kinds of plots`
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