foreach (string name in q)
{
for (int i = 0; i < 3; i++)
...
C# substring according to sign
this code is used to sub st...
/// <summary>
/// Takes HTML and list of all positions of h3 tags and splits them.
/// </summary>
...
C# Split HTML from header tag ...
The HTML is pre-parsed to g...
def parse_query(s)
if s.count(':') == 0
return s
...
Ruby Parsing key value with no d...
Input: "the big state:activ...
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...
// 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 ...
I have a map of strings whe...
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...
def compress(source)
source.gsub!(/\s+/, " ") # collapse space
source.gsub!(/\/\*(.*?)\*\//, "") # remove comments - caution, might want to remove this if using css hacks
...
Ruby Gsubing
There is a lot of repetitio...
namespace Utilities
{
using System;
...
C# StringExt.cs (String Extens...
Ok take it easy on me, I ju...
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 ...
function toUpperCase( str : String ):String {
...
JavaScript Uppercase a string, but ski...
I had to do this on my curr...
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?
We've had the debate over w...
not good enough(