/ Published in: TCL
Expand |
Embed | Plain Text
proc _commify {num {sep ,}} { # commify -- # puts commas into a decimal number # Arguments: # num number in acceptable decimal format # sep separator char (defaults to English format ",") # Returns: # number with commas in the appropriate place # while {[regsub {^([-+]?\d+)(\d\d\d)} $num "\\1$sep\\2" num]} {} return $num }
You need to login to post a comment.
