e.g. StrUtils to strUtils, str to str
@param string e.g. StrUtils
@return e.g. stringUtils
495395
public static String toFirstLower(String string) {
		int c = ((int) string.charAt(0));
		if (c >= 65 && c <=90) {
			// is upper
			char lower = (char) (((int) string.charAt(0)) + 32);
			return lower + string.substring(1);
		}
		return string;
	}
849
private function applyTransformers(string $string): string
    {
        foreach (Transformer::getAll() as $transformer) {
            $string = $transformer($string);
        }

        return $string;
    }
856437
protected List<String> split(final String string){
        if (null!=prefix){
            //remove prefix before split
            return Arrays.asList(string.substring(prefix.length()).split(delimiter));
        }else{
            return Arrays.asList(string.split(delimiter));
        }

    }
1196281
public static function fromString($string, $separator=' '){

        $string = (string)$string;

        if($separator === ''){
            return new StringList(str_split($string),'');
        }

        $prefix = '';
        $suffix = '';
        if($string[0] == $separator){
            $prefix = $separator;
        }
        if($string[strlen($string)-1] == $separator){
            $suffix = $separator;
        }
        $strList = new StringList(explode($separator,trim($string,$separator)),
                                          $separator);
        $strList->prefix = $prefix;
        $strList->suffix = $suffix;
        return $strList;
    }
893550
public String getString(String string)
    {
        String strReturn = null;
        try   {
            if (m_resources == null)
                this.setLanguage(null);  // If the resource file is not here, add the default file.
            if (m_resources != null)
                if (string != null)
                    strReturn = m_resources.getString(string);
        } catch (MissingResourceException ex) {
            strReturn = null;
        }
        if ((strReturn != null) && (strReturn.length() > 0))
            return strReturn;
        else
            return string;
    }
1351793
private static String escape(String string) {
    return StringUtils.escapeString(string, StringUtils.ESCAPE_CHAR, 
                                    charsToEscape);
  }
885628
public String convertString(String string)
    {
        if (string.indexOf("<referral") != -1)
        {
            int iStart = string.indexOf("url=\"") + 5;
            int iEnd = string.indexOf('\"', iStart);
            if ((iStart != 4) && (iEnd != -1))
            {
                String filename = string.substring(iStart, iEnd);
                if (filename.indexOf(":/") == -1)
                {
                    String stringFile = readFile(filename);
                    
                    if (stringFile != null)
                        string = "<!-- " + "Repository inlined from: " + filename  + " -->"
                            + "\n" + stringFile + "\n";
                }        
            }
        }
        return string;
    }
275434
public String toSentenceString(ArrayList s) {
    StringBuilder sb = new StringBuilder();
    for (int wordNum = start(), end = end(); wordNum <= end; wordNum++) {
      sb.append(s.get(wordNum));
      if (wordNum != end) {
        sb.append(" ");
      }
    }
    return sb.toString();
  }
1222934
public static function strtoupper(string $string): string
    {
        return str_replace('ß', 'SS', mb_strtoupper($string, 'UTF-8'));
    }
955925
public static Pattern stringCaseInsensitive(final String string) {
    return new Pattern() {
      @Override public int match(CharSequence src, int begin, int end) {
        return matchStringCaseInsensitive(string, src, begin, end);
      }
      @Override public String toString() {
        return string.toUpperCase();
      }
    };
  }
593071
public static function stringToArray(string $string): array
    {
        list($from, $to) = explode(self::SEPARATOR, $string);
        $from = empty($from)
            ? self::ZERO
            : (is_numeric($from)
                ? (int) $from
                : $from);

        $to = empty($to)
            ? self::INFINITE
            : (is_numeric($to)
                ? (int) $to
                : $to);

        return [$from, $to];
    }
1033992
public static String toObnString(String s) {
        if (s != null && !s.isEmpty())
            return s.replace(':', '.').replace('=', '.').replace(',', '.').replace('"', '.');
        return s;
    }
570493
public static String shrink(String string) {
		if (string == null) {
			return null;
		}
		string = string.trim();
		return SHRINK.matcher(string).replaceAll(" ");
	}
1316039
public static String getWithFirstUpperCase(String string) {
        if (string == null) {
            return "";
        }

        if (string.length() == 1) {
            return string.substring(0, 1).toUpperCase();
        }

        return string.substring(0, 1).toUpperCase() + string.substring(1);
    }
1036165
public static function stringToArray($string)
    {
        if (!preg_match("@^{.*?}$@", $string)) {
            return $string;
        }
        $parts = explode(',', substr($string, 1, -1));
        foreach ($parts as &$part) {
            $part = self::stringToArray($part);
        }
        return $parts;
    }
444143
public static function fromString($string)
	{
		$lowercaseString = trim(strtolower($string), "\\");

		// TODO: variant types

		if ($lowercaseString === "mixed") {
			return MixedType::getInstance();

		} elseif ($lowercaseString === "scalar") {
			return ScalarType::getInstance();

		} elseif ($lowercaseString === "object") {
			return ObjectType::getInstance();

		} elseif ($lowercaseString === "void" || $lowercaseString === "null") {
			return VoidType::getInstance();

		} elseif ($lowercaseString === "numeric" || $lowercaseString === "number") {
			return NumericType::getInstance();

		} elseif ($lowercaseString === "int" || $lowercaseString === "integer") {
			return IntType::getInstance();

		} elseif ($lowercaseString === "float" || $lowercaseString === "double") {
			return FloatType::getInstance();

		} elseif ($lowercaseString === "bool" || $lowercaseString === "boolean") {
			return BoolType::getInstance();

		} elseif ($lowercaseString === "string") {
			return StringType::getInstance();

		} elseif ($lowercaseString === "resource" || $lowercaseString === "stream") {
			return ResourceType::getInstance();

		} elseif ($lowercaseString === "callable" || $lowercaseString === "callback" || trim($lowercaseString, "\\") === "closure") {
			return CallableType::getInstance();

		} elseif (strncmp($lowercaseString, "array", 5 /* strlen("array") */) === 0) {
			return ArrayType::create(MixedType::getInstance());

		} else {
			if (func_num_args() > 1) {
				$stack = func_get_arg(1);
			} else {
				$stack = new \ArrayObject();
			}

			if (func_num_args() > 2) {
				$reader = func_get_arg(2);
			} else {
				$reader = new AnnotationReader();
			}

			if (func_num_args() > 3) {
				$phpParser = func_get_arg(3);
			} else {
				$phpParser = new PhpParser();
			}

			if (func_num_args() > 4 && func_get_arg(4) !== null) {
				/** @var Type $declaringType */
				$declaringType = func_get_arg(4);
				$useStatements = $declaringType->getUseStatements();
			} else {
				$declaringType = null;
				$useStatements = array();
			}

			if ($lowercaseString === "\$this" || $lowercaseString === "self" || $lowercaseString === "static") {
				if ($declaringType === null) {
					throw new \InvalidArgumentException("Type string references declaring class, but no declaring class given.");
				}

				return $declaringType;

			} elseif (substr($string, -2) === "[]") {
				$baseString = substr($string, 0, strlen($string) - 2);
				return ArrayType::create(MixedType::fromString($baseString, $stack, $reader, $phpParser, $declaringType));

			} else {
				if ($string[0] === "\\") {
					$typeName = trim($string, "\\");

				} elseif (isset($useStatements[$lowercaseString])) {
					$typeName = $useStatements[$lowercaseString];
					// TODO: `use` with namespace (e.g. `use Doctrine\Mapping as ORM;`)

				} elseif ($declaringType !== null) {
					$typeName = $declaringType->getNamespaceName() . "\\" . $string;

				} else {
					$typeName = $string;
				}

				return Type::fromReflection(new \ReflectionClass($typeName), $stack, $reader, $phpParser);
			}
		}
	}
431785
public static Str of(String s) {
        if (S.empty(s)) return EMPTY_STR;
        return new Str(s);
    }