def append
  string = ''
  5.times do
...

Ruby append string in iterator

by ololo777.myopenid.com, July 15, 2011 05:06, 4 refactorings, tagged with string, ruby

not good enough(

55502f40dc8b7c769880b10874abc9d0 Talk
foreach (string name in q)
                {
                    for (int i = 0; i < 3; i++)
...

C# substring according to sign

by anyname.myopenid.com, June 21, 2011 05:34, 10 refactorings, tagged with string, asp.net, c#

this code is used to sub st...

55502f40dc8b7c769880b10874abc9d0 Talk
/// <summary>
        /// Takes HTML and list of all positions of h3 tags and splits them.
        /// </summary>
...

C# Split HTML from header tag ...

by Ender, March 09, 2011 12:52, 2 refactorings, tagged with string, html, C#, parse

The HTML is pre-parsed to g...

C98e188ba63a7875d61a77d7aaa3f5c7 Talk
def parse_query(s)
  if s.count(':') == 0
    return s
...

Ruby Parsing key value with no d...

by theshionak, February 22, 2011 19:21, 9 refactorings, tagged with string, ruby, regex, parse

Input: "the big state:activ...

38ad07c474f260c81ca64a66edfe446e Talk
class String
  
  def titlecap
...

Ruby Ruby Title Caps method

by SmackTurtle, October 05, 2010 21:06, 7 refactorings, tagged with string, ruby, Capitalize, titlecaps, dangerous

Capitalizes the first lette...

6572fa57acbc8588e27f95f2592d9048 Talk
// Check to make sure value is non-null and matches CSS grammar
// A property may contain more than one class name so we need to
// check each potential class name in the string.
...

Java Validate CSS classnames in ...

by Zack The Human, July 23, 2010 17:08, 2 refactorings, tagged with string, regex, foreach

I have a map of strings whe...

05a80d2c7b26a787f4f1742644f76054 Talk
def dedent()
            sRaw    =   self;
            sep     =   "\n";
...

Ruby ruby dedent whitespace in a...

by dreftymac.myopenid.com, March 05, 2010 16:37, 4 refactorings, tagged with string, ruby, monkeypatch

Remove leading whitespace f...

55502f40dc8b7c769880b10874abc9d0 Talk
def compress(source)
    source.gsub!(/\s+/, " ") # collapse space
    source.gsub!(/\/\*(.*?)\*\//, "") # remove comments - caution, might want to remove this if using css hacks
...

Ruby Gsubing

by marko.z, October 31, 2008 09:44, 2 refactorings, tagged with string, ruby, css, gsub

There is a lot of repetitio...

Bd9893bfd15fa7b443d112607b937734 Talk
namespace Utilities
{
    using System;
...

C# StringExt.cs (String Extens...

by snafu918, August 06, 2008 16:46, 6 refactorings, tagged with string, C#, Extension, coldfusion

Ok take it easy on me, I ju...

95fd293467e8e89e44701d09eead51d4 Talk
class Race < ActiveRecord::Base
  
...

Ruby Help generating abbreviatio...

by Michael Filbin, April 06, 2008 16:16, 3 refactorings, tagged with string, model, abbreviation, attribute

Hi all,

I am attempting ...

14b8667b3bdf64068647b96c26001e0d Talk
function toUpperCase( str : String ):String {
...

JavaScript Uppercase a string, but ski...

by slaskis, October 30, 2007 18:46, 2 refactorings, tagged with string, uppercase, avoid characters

I had to do this on my curr...

Ad2ffc6b05fb4390643f36a258b86362 Talk
class String 
  def postal?  
    self.match(/[a-zA-Z]{1}\d{1}[a-zA-Z]{1}([\x20-])*\d{1}[a-zA-Z]{1}\d{1}/) ? true : false
...

Ruby Is This String Postal?

by Gary Haran, October 30, 2007 15:29, 9 refactorings, tagged with string, class, postal

We've had the debate over w...

403e57e2be130d2218f992b86dfa8260 Talk