muqube
  • About
  • Articles
Feb 24, 2014

Javascript Arithmetic Operation on Numeric Strings

In an statement involving the ‘+’ operator on a numeric string and an int, JavaScript converts the int into a string and perform string concatenation. For all other arithmetic operators, the numeric string is converted to a number. This is elaborated with the example bellow.

console.log ( "12...
Feb 8, 2014

String representation of Python objects

It is often necessary to provide string representation of objects. Application of this can be found in debugging, storing in a file, communication across the network, etc. Two builtin functions str() and repr() output string representation of Python objects. But how do they differ from each other...

Jan 15, 2014

Benchmarking Python String Replacemnt

Python offers several ways of string replacement. But which one is the most efficient ? I set up a little experiment to find out. A file containing some 30,000 characters were generated using this lipsum generator tool. Then a few Python scripts were written to try out d...

string (3)
  • JavaScript
  • Python

Copyright © 2015 - 2018 Raiyan Kamal, All Rights Reserved.