Most viewed recipes tagged "strings"http://code.activestate.com/recipes/tags/strings/views/2016-07-14T21:08:01-07:00ActiveState Code RecipesConvert Spelled out Integers (e.g. three thousand two hundred fifty) into Integers (e.g. 3250) and Vice Versa (Python)
2016-06-09T20:35:26-07:00Brandon Martinhttp://code.activestate.com/recipes/users/4194238/http://code.activestate.com/recipes/580679-convert-spelled-out-integers-eg-three-thousand-two/
<p style="color: grey">
Python
recipe 580679
by <a href="/recipes/users/4194238/">Brandon Martin</a>
(<a href="/recipes/tags/integers/">integers</a>, <a href="/recipes/tags/numbers/">numbers</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/strings/">strings</a>).
</p>
<p>-Provides an isNumber function that can test if a floating point number is a number
-str_to_int can convert a spelled out integer (e.g. 'one hundred thirty five') to its numeric form (e.g. 135)
-int_to_str can convert an integer into its spelled out form.</p>
Convert Spelled out Integers (e.g. three thousand two hundred fifty) into Integers (e.g. 3250) and Vice Versa (Python)
2016-07-14T21:08:01-07:00Chathura Gunasekarahttp://code.activestate.com/recipes/users/4194443/http://code.activestate.com/recipes/580689-convert-spelled-out-integers-eg-three-thousand-two/
<p style="color: grey">
Python
recipe 580689
by <a href="/recipes/users/4194443/">Chathura Gunasekara</a>
(<a href="/recipes/tags/integers/">integers</a>, <a href="/recipes/tags/numbers/">numbers</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/strings/">strings</a>).
</p>
<p>-Provides an isNumber function that can test if a floating point number is a number
-str_to_int can convert a spelled out integer (e.g. 'one hundred thirty five') to its numeric form (e.g. 135)
-int_to_str can convert an integer into its spelled out form.</p>
python string concatenation (Python)
2012-11-18T21:49:51-08:00akhil jaggarwalhttp://code.activestate.com/recipes/users/4184305/http://code.activestate.com/recipes/578333-python-string-concatenation/
<p style="color: grey">
Python
recipe 578333
by <a href="/recipes/users/4184305/">akhil jaggarwal</a>
(<a href="/recipes/tags/efficient/">efficient</a>, <a href="/recipes/tags/strings/">strings</a>).
</p>
<p>tests efficiency of string concatenation operations in python</p>
format_iter: easy formatting of arbitrary iterables (Python)
2011-08-16T11:44:59-07:00Nick Coghlanhttp://code.activestate.com/recipes/users/2035254/http://code.activestate.com/recipes/577845-format_iter-easy-formatting-of-arbitrary-iterables/
<p style="color: grey">
Python
recipe 577845
by <a href="/recipes/users/2035254/">Nick Coghlan</a>
(<a href="/recipes/tags/formatting/">formatting</a>, <a href="/recipes/tags/strings/">strings</a>).
</p>
<p>The <code>format_iter</code> recipe defines a simple wrapper around <code>str.join</code> and <code>str.format</code> that makes it easy to format an arbitrary iterable with a specified format string and item separator.</p>
Routine to i18nify any word (Python)
2016-05-19T18:41:26-07:00Vasudev Ramhttp://code.activestate.com/recipes/users/4173351/http://code.activestate.com/recipes/580662-routine-to-i18nify-any-word/
<p style="color: grey">
Python
recipe 580662
by <a href="/recipes/users/4173351/">Vasudev Ram</a>
(<a href="/recipes/tags/i18n/">i18n</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/strings/">strings</a>, <a href="/recipes/tags/text_processing/">text_processing</a>).
</p>
<p>This recipe shows a routine and a driver program that lets you "i18nify" any word, similar to how the word "internationalization" is shortened to "i18n", and "localization" to "l10n".</p>