package com.netgrind.core {
	
	/**
	 * ...
	 * @author netgrind
	 */
	public class UtilsString {
		
		public static function removeCharacter(s:String, remove:String=' '):String {
			var ndx:int
			do {
				ndx = s.indexOf(remove);
				if (ndx != -1) {
					s = s.slice(ndx, remove.length);
				}
			}while (ndx != 1);
			return s;
		}
		
		public static function getBetween(s:String, startPattern:String, endPattern:String):String {
			var i:int = s.indexOf(startPattern);
			if (i == -1) i = 0;
			else i += startPattern.length;
			var e:int = s.indexOf(endPattern, i);
			if (e == -1) e = s.length;
			return s.substring(i, e);
		}
		
	}
	
}