require 'active_support/core_ext'

class Float
...

Ruby Humanizing currency

by Stephen, May 03, 2011 10:44, No refactoring, tagged with rails, strings, money

Looking for a more succinct...

057e54d9a7b6ce3614413fcab825fca8 Talk
def rot_encode(s, offset=2)
   s.split('').map{ |char| (char.ord + offset).chr }.join
end

Ruby rot encode

by Sam Figueroa, January 17, 2010 11:44, 5 refactorings, tagged with strings, rot, rotation, encode

Rotation encoding with vari...

45596033957b2b6d7ef8fe6545e0b7e7 Talk
package engine;

import junit.framework.Assert;
...

Java Refactor, fix and optimize ...

by programmer-offsite, April 20, 2009 14:15, 5 refactorings, tagged with java, refactor, strings, character, optimize

While tuning the applicatio...

6f0a7377a1c0faa24f9b60e24ab2af4a Talk
char **split (char *string, char sep, char escape) {

    char **ret = NULL;
...

C A Java-like function split

by Fran, September 16, 2008 08:32, 3 refactorings, tagged with c, split, strings

This function splits a stri...

3c50320adac71693cef577a5dbd3d4d4 Talk
data = data.gsub("\xA0", " ")
data = data.gsub("\x99", "(TM)")
data = data.gsub("\x97", "-")
...

Ruby simplify multiple gsub

by kenr, August 27, 2008 01:10, 11 refactorings, tagged with strings

I could put the search/repl...

60997be4fbb4f5719d6eb68a1eadee9a Talk