private static String replaceFirst(String string, String target, String replacement) {
		Validate.notNull(string);
		Validate.notNull(target);
		Validate.notNull(replacement);
		
		if (target.isEmpty()) {
			return string;
		}
		
		char[] chars = string.toCharArray();
		char[] targetChars = target.toCharArray();
		
		int index = 0;
		int start = -1;
		
		for (int i = 0; i < chars.length; i++) {
			if (chars[i] == targetChars[index]) {
				if (index == 0) {
					start = i;
				}
				
				index++;
				
				if (index >= targetChars.length) {
					String firstPart = string.substring(0, start);
					String secondPart = string.substring(i + 1, chars.length);
					
					return firstPart + replacement + secondPart;
				}
			} else {
				index = 0;
			}
		}
		
		return string;
	}