eliminate class StringUtil

Change-Id: I07cd8c70d2db8abe415f720275b6c25d464ba91c
Signed-off-by: Martin Weber <fifteenknots505@gmail.com>
diff --git a/cmake/org.eclipse.cdt.cmake.core/META-INF/MANIFEST.MF b/cmake/org.eclipse.cdt.cmake.core/META-INF/MANIFEST.MF
index 88f217a..140f7e7 100644
--- a/cmake/org.eclipse.cdt.cmake.core/META-INF/MANIFEST.MF
+++ b/cmake/org.eclipse.cdt.cmake.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.cdt.cmake.core;singleton:=true
-Bundle-Version: 1.4.0.qualifier
+Bundle-Version: 1.4.100.qualifier
 Bundle-Activator: org.eclipse.cdt.cmake.core.internal.Activator
 Bundle-Vendor: %providerName
 Require-Bundle: org.eclipse.core.runtime,
diff --git a/cmake/org.eclipse.cdt.cmake.is.core/src/org/eclipse/cdt/cmake/is/core/CompileCommandsJsonParser.java b/cmake/org.eclipse.cdt.cmake.is.core/src/org/eclipse/cdt/cmake/is/core/CompileCommandsJsonParser.java
index 471ad73..922edf9 100644
--- a/cmake/org.eclipse.cdt.cmake.is.core/src/org/eclipse/cdt/cmake/is/core/CompileCommandsJsonParser.java
+++ b/cmake/org.eclipse.cdt.cmake.is.core/src/org/eclipse/cdt/cmake/is/core/CompileCommandsJsonParser.java
@@ -30,7 +30,6 @@
 import org.eclipse.cdt.cmake.is.core.internal.ParserDetection.DetectorWithMethod;
 import org.eclipse.cdt.cmake.is.core.internal.ParserDetection.ParserDetectionResult;
 import org.eclipse.cdt.cmake.is.core.internal.Plugin;
-import org.eclipse.cdt.cmake.is.core.internal.StringUtil;
 import org.eclipse.cdt.cmake.is.core.internal.builtins.CompilerBuiltinsDetector;
 import org.eclipse.cdt.cmake.is.core.participant.DefaultToolDetectionParticipant;
 import org.eclipse.cdt.cmake.is.core.participant.IRawIndexerInfo;
@@ -225,7 +224,7 @@
 				// CMake-notation (fileSep are forward slashes)
 				final String cwdStr = sourceFileInfo.getDirectory();
 				IPath cwd = cwdStr != null ? Path.fromOSString(cwdStr) : new Path(""); //$NON-NLS-1$
-				IResult result = parser.processArgs(cwd, StringUtil.trimLeadingWS(pdr.getReducedCommandLine()));
+				IResult result = parser.processArgs(cwd, pdr.getReducedCommandLine().stripLeading());
 				// remember result together with file name
 				rememberFileResult(file, result);
 
diff --git a/cmake/org.eclipse.cdt.cmake.is.core/src/org/eclipse/cdt/cmake/is/core/internal/StringUtil.java b/cmake/org.eclipse.cdt.cmake.is.core/src/org/eclipse/cdt/cmake/is/core/internal/StringUtil.java
deleted file mode 100644
index b879c74..0000000
--- a/cmake/org.eclipse.cdt.cmake.is.core/src/org/eclipse/cdt/cmake/is/core/internal/StringUtil.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2019 Martin Weber.
- *
- * Content is provided to you under the terms and conditions of the Eclipse Public License Version 2.0 "EPL".
- * A copy of the EPL is available at http://www.eclipse.org/legal/epl-2.0.
- *
- * SPDX-License-Identifier: EPL-2.0
- *******************************************************************************/
-
-package org.eclipse.cdt.cmake.is.core.internal;
-
-/**
- * String manipulation functions.
- *
- * @author Martin Weber
- */
-public class StringUtil {
-
-	/**
-	 * Just static methods.
-	 *
-	 */
-	private StringUtil() {
-	}
-
-	/**
-	 * Returns a copy of the string, with leading whitespace omitted.
-	 *
-	 * @param string the string to remove whitespace from
-	 * @return A copy of the string with leading white space removed, or the string
-	 *         if it has no leading white space.
-	 */
-	public static String trimLeadingWS(String string) {
-		int len = string.length();
-		int st = 0;
-
-		while ((st < len) && (string.charAt(st) <= ' ')) {
-			st++;
-		}
-		return st > 0 ? string.substring(st, len) : string;
-	}
-
-}
diff --git a/cmake/org.eclipse.cdt.cmake.is.core/src/org/eclipse/cdt/cmake/is/core/participant/DefaultToolCommandlineParser.java b/cmake/org.eclipse.cdt.cmake.is.core/src/org/eclipse/cdt/cmake/is/core/participant/DefaultToolCommandlineParser.java
index d94da44..ee65bab 100644
--- a/cmake/org.eclipse.cdt.cmake.is.core/src/org/eclipse/cdt/cmake/is/core/participant/DefaultToolCommandlineParser.java
+++ b/cmake/org.eclipse.cdt.cmake.is.core/src/org/eclipse/cdt/cmake/is/core/participant/DefaultToolCommandlineParser.java
@@ -14,7 +14,6 @@
 
 import org.eclipse.cdt.cmake.is.core.internal.ParseContext;
 import org.eclipse.cdt.cmake.is.core.internal.Plugin;
-import org.eclipse.cdt.cmake.is.core.internal.StringUtil;
 import org.eclipse.cdt.cmake.is.core.participant.builtins.IBuiltinsDetectionBehavior;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.Platform;
@@ -124,7 +123,7 @@
 		@SuppressWarnings("nls")
 		private IResult parseArguments(IResponseFileArglet responseFileArglet, String args) {
 			// eat buildOutput string argument by argument..
-			while (!(args = StringUtil.trimLeadingWS(args)).isEmpty()) {
+			while (!(args = args.stripLeading()).isEmpty()) {
 				boolean argParsed = false;
 				int consumed;
 				// parse with first parser that can handle the first argument on the