Get the number of specified chars, the passed string starts with.

@param s
The string to be parsed. May be <code>null</code>.
@param c
The char to be searched.
@return Always &ge; 0.
340260
@Nonnegative
  public static int getLeadingCharCount (@Nullable final String s, final char c)
  {
    int ret = 0;
    if (s != null)
    {
      final int nMax = s.length ();
      while (ret < nMax && s.charAt (ret) == c)
        ++ret;
    }
    return ret;
  }
842678
public static boolean isNameChar (char c)
    {
	// [4] NameChar ::= Letter | Digit | '.' | '_' | ':'
	//			| CombiningChar | Extender

	if (isLetter2 (c))
	    return true;
	else if (c == '>')
	    return false;
	else if (c == '.' || c == '-' || c == '_' || c == ':'
		|| isExtender (c))
	    return true;
	else
	    return false;
    }
1177469
public static boolean startsWithIgnoreCase(String s,String w)
    {
        if (w==null)
            return true;
        
        if (s==null || s.length()<w.length())
            return false;
        
        for (int i=0;i<w.length();i++)
        {
            char c1=s.charAt(i);
            char c2=w.charAt(i);
            if (c1!=c2)
            {
                if (c1<=127)
                    c1=lowercases[c1];
                if (c2<=127)
                    c2=lowercases[c2];
                if (c1!=c2)
                    return false;
            }
        }
        return true;
    }
405941
public static CharPredicate isChar(final char c) {
    return new CharPredicate() {
      @Override public boolean isChar(char x) {
        return x == c;
      }
      @Override public String toString() {
        return Character.toString(c);
      }
    };
  }
1169503
public static int substr_count(final String string, final char character) {
        int count = 0;
        int n = string.length();
        for(int i=0;i<n;i++) {
            if(string.charAt(i)==character) {
                ++count;
            }
        }

        return count;
    }
972676
protected String nextLetterNumber( int c ) throws IOException 
    {
        //StringBuilder isb = new StringBuilder();
        isb.clear();
        isb.append((char)c);
        int ch;
        while ( (ch = readNext()) != -1 ) {
            if ( StringUtil.isWhitespace(ch) ) {
                pushBack(ch);
                break;
            }
            
            if ( ! StringUtil.isLetterNumber( ch ) ) {
                pushBack(ch);
                break;
            } 
            
            isb.append((char)ch);
        }
        
        return isb.toString();
    }
859400
private static int _indexOf(@Nonnull String s, char ch) {
        int idx = s.indexOf(ch);
        if (idx<0)  return s.length();
        return idx;
    }
319735
@Nonnegative
  public static int getTrailingCharCount (@Nullable final String s, final char c)
  {
    int ret = 0;
    if (s != null)
    {
      int nLast = s.length () - 1;
      while (nLast >= 0 && s.charAt (nLast) == c)
      {
        ++ret;
        --nLast;
      }
    }
    return ret;
  }
237636
@Nonnegative
  public static int getUTF8ByteCount (@Nullable final String s)
  {
    return s == null ? 0 : getUTF8ByteCount (s.toCharArray ());
  }
1040921
public static char getCorrespondingSymbol(String name) {
        Character symbol = (Character) map.get(name);
        if (symbol == null) {
            return (char)0;
        }
        return symbol.charValue();
    }
860261
static CharSequence decode(final CharSequence s) {
    if (!contains(s, '%')) {
      return s.toString();
    }
    return decode0(s);
  }
880404
@Override
    public boolean contains(CharSequence s) {
        if (s instanceof FastStr) {
            return indexOf((FastStr) s) > -1;
        }
        return indexOf(s.toString()) > -1;
    }
582750
public static int getTrimmedLength(CharSequence s) {
        int len = s.length();

        int start = 0;
        while (start < len && s.charAt(start) <= ' ') {
            start++;
        }

        int end = len;
        while (end > start && s.charAt(end - 1) <= ' ') {
            end--;
        }

        return end - start;
    }
758002
private int _countCharsStart (final char ch)
  {
    int nCount = 0;
    for (int i = 0; i < m_sValue.length (); i++)
    {
      final char c = m_sValue.charAt (i);
      if (c == ' ')
        continue;
      if (c != ch)
        break;
      nCount++;
    }
    return nCount;
  }
765013
@Override
  public boolean addAll(Collection<? extends Character> c) {
    ensureCapacity(size + c.size());
    for (char e : c) {
      elements[size++] = e;
    }
    return c.size() > 0;
  }
483907
public static final Bytes of(String s, Charset c) {
    Objects.requireNonNull(s);
    Objects.requireNonNull(c);
    if (s.isEmpty()) {
      return EMPTY;
    }
    byte[] data = s.getBytes(c);
    return new Bytes(data);
  }
1096208
public static boolean isAlphanumeric(String s) {
        if (isEmpty(s)) return defaultEmptyOK;

        // Search through string's characters one by one
        // until we find a non-alphanumeric character.
        // When we do, return false; if we don't, return true.
        for (int i = 0; i < s.length(); i++) {
            // Check that current character is number or letter.
            char c = s.charAt(i);

            if (!isLetterOrDigit(c)) return false;
        }

        // All characters are numbers or letters.
        return true;
    }