書式の因子を記号'@'とそれ以外に変換する。
@param str
@return
163377
private List<Token> convertFactor(final Token.Factor factor) {
        
        final String item = factor.getValue();
        final int itemLength = item.length();
        final List<Token> list = new ArrayList<>();
        
        StringBuilder sb = new StringBuilder();
        for(int i=0; i < itemLength; i++) {
            char c = item.charAt(i);
            if(c == '@') {
                // バッファから取り出し、新たにバッファを作成する
                list.add(Token.factor(sb.toString()));
                sb = new StringBuilder();
                
                list.add(Token.SYMBOL_AT_MARK);
                
            } else {
                sb.append(c);
            }
        }
        
        if(sb.length() > 0) {
            list.add(Token.factor(sb.toString()));
            sb = null;
        }
        
        return list;
    }
437057
public static String pad(int repeat, String str) {
        StringBuilder sb = new StringBuilder();
        for(int i=0; i < repeat; i++) {
            sb.append(str);
        }
        return sb.toString();
    }
816793
public final static boolean isMailAddress(String str)
    {
        int atIndex = str.indexOf('@');
        if ( atIndex == -1 ) {
            return false;
        }
        
        if ( ! StringUtil.isLetterOrNumeric(str, 0, atIndex) ) {
            return false;
        }
        
        int ptIndex, ptStart = atIndex + 1;
        while ( (ptIndex = str.indexOf('.', ptStart)) > 0 ) {
            if ( ptIndex == ptStart ) {
                return false;
            }
            
            if ( ! StringUtil.isLetterOrNumeric(str, ptStart, ptIndex) ) {
                return false;
            }
            
            ptStart = ptIndex + 1;
        }
        
        if ( ptStart < str.length() 
                && ! StringUtil.isLetterOrNumeric(str, ptStart, str.length()) ) {
            return false;
        }
        
        return true;
    }
388902
public static Document getDomFromString( String str )
    {
        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
        factory.setNamespaceAware( true );

        try {
            DocumentBuilder builder = factory.newDocumentBuilder();
            return builder.parse( new InputSource( new StringReader( str ) ) );
        } catch ( Exception e ) {
            throw new CStorageException( "Error parsing the Xml response: " + str, e );
        }
    }
846309
public static String toHyphenLine(String str) {
        if (str == null) {
            return null;
        }
        if (str.isEmpty()) {
            return str;
        }
        // 本身连词符
        if (str.indexOf(SEPARATOR_HYPHEN_LINE) >= 0) {
            return str.toLowerCase();
        }
        // 本身下划线
        if (str.indexOf(SEPARATOR_UNDER_LINE) >= 0) {
            return str.replace(SEPARATOR_UNDER_LINE, SEPARATOR_HYPHEN_LINE)
                    .toLowerCase();
        }
        StringBuilder sb = new StringBuilder();
        boolean upperCase = false;
        for (int i = 0; i < str.length(); i++) {
            char c = str.charAt(i);
            boolean nextUpperCase = true;
            if (i < (str.length() - 1)) {
                nextUpperCase = Character.isUpperCase(str.charAt(i + 1));
            }
            if ((i >= 0) && Character.isUpperCase(c)) {
                if (!upperCase || !nextUpperCase) {
                    if (i > 0) {
                        sb.append(SEPARATOR_HYPHEN_LINE);
                    }
                }
                upperCase = true;
            } else {
                upperCase = false;
            }
            sb.append(Character.toLowerCase(c));
        }
        return sb.toString();
    }
335374
public static boolean hasText(@Nullable CharSequence str) {
        if (isEmpty(str)) {
            return false;
        }

        int strLen = str.length();
        for (int i = 0; i < strLen; i++) {
            if (!Character.isWhitespace(str.charAt(i))) {
                return true;
            }
        }
        return false;
    }
471346
private int getIndexOfCurlyB(String str) {
        int i;
        int j;
        i = str.indexOf("{");
        j = str.indexOf("\\{");
        while ((i - 1 == j) && (j != -1)) {
            i = str.indexOf("{", i + 1);
            j = str.indexOf("\\{", j + 1);
        }
        return i;
    }
1300217
public static String upperCase(String str) {
        if(isNullOrEmpty(str)) {
            return str;
        }
        return str.toUpperCase(LOCALE_ENGLISH);
    }
3486
public static Parser<Void> stringCaseInsensitive(String str) {
    return Patterns.stringCaseInsensitive(str).toScanner(str);
  }
1180521
public static CharSequence ltrim(CharSequence str)
	{
		int len;
		int i;

		if(str == null || (len = str.length()) <= 0)
			return "";
		for(i=0;i<len;i++)
			if(!Character.isWhitespace(str.charAt(i)))
				break;
		if(i>=len)
			return "";
		return str.subSequence(i, len);
	}
1277719
public static List<String> findVars(final String str) {
        final List<String> vars = new ArrayList<String>();
        final char[] strArray = str.toCharArray();
        int i = 0;
        while (i < strArray.length - 1) {
            if (strArray[i] == VAR_START && strArray[i + 1] == VAR_LEFT_BOUND) {
                i = i + 2;
                final int begin = i;
                while (strArray[i] != VAR_RIGHT_BOUND) {
                    ++i;
                }
                final String var = str.substring(begin, i++);
                if (!vars.contains(var)) {
                    vars.add(var);
                }
            } else {
                ++i;
            }
        }
        return vars;
    }
57371
public static String escape(String str) {
		if (StrUtil.isEmpty(str)) {
			return str;
		}

		final int len = str.length();
		final StringBuilder builder = new StringBuilder(len);
		char c;
		for (int i = 0; i < len; i++) {
			c = str.charAt(i);
			builder.append(escape(c));
		}
		return builder.toString();
	}
343134
public static String lowerCaseFirstChar(String _str) {
        if (_str == null) {
            return null;
        }
        if (_str.isEmpty()) {
            return _str;
        }

        return _str.substring(0, 1).toLowerCase() + _str.substring(1);
    }
650658
public static String decode(String str) {
    if (str!=null) {
      try {
        StringBuilder sb = new StringBuilder();
        for (int idx = str.toLowerCase().indexOf("%2f"); idx>=0; idx = str.toLowerCase().indexOf("%2f")) {
          sb.append(java.net.URLDecoder.decode(str.substring(0, idx),"UTF-8")).append(str.substring(idx, idx+3));
          str = str.substring(idx+3);
        }
        sb.append(java.net.URLDecoder.decode(str,"UTF-8"));
        str = sb.toString();
      } catch (Exception ex) {
      }
    }
    return str;
  }
10669
public static String toLowerCaseWithUnderscore(final String str) {
        if (N.isNullOrEmpty(str)) {
            return str;
        }

        String result = lowerCaseWithUnderscorePropNamePool.get(str);

        if (result == null) {
            result = StringUtil.toLowerCaseWithUnderscore(str);
            lowerCaseWithUnderscorePropNamePool.put(str, result);
        }

        return result;
    }
1063659
public static String encode(String str)
	{
		try
		{
			return java.net.URLEncoder.encode(str, "UTF-8");
		}
		catch(java.io.UnsupportedEncodingException ue)
		{
			return str;
		}
	}
571463
public static String lowerCase(String str) {
        if(isNullOrEmpty(str)) {
            return str;
        }
        return str.toLowerCase(LOCALE_ENGLISH);
    }