Parses semicolon-separated key-value pairs and returns them as a
FilterParams.

@param line semicolon-separated key-value list to initialize FilterParams.
@return a newly created FilterParams.

@see StringValueMap#toString()
349728
public static FilterParams fromString(String line) {
		StringValueMap map = StringValueMap.fromString(line);
		return new FilterParams(map);
	}
344693
protected static String parseValue (String line)
    {
        int eidx = line.indexOf("=");
        return (eidx == -1) ? "" : line.substring(eidx+1).trim();
    }
1039867
public static RemoteCommand parse(String inputLine) {
    if (null == inputLine) throw new NullPointerException("inputLine can't be null");
    String[] values = inputLine.split("\\|");
    if (values.length != NUMARGSINCLUDINGBOUNDARIES) {
      throw new IllegalStateException("Cannot parse invalid line: " + inputLine + values.length);
    }
    return new DefaultRemoteCommand(values[FIRSTINDEX], new String[] {values[SECONDINDEX],
        values[THIRDINDEX]});
  }
1188292
public static List<Object> parseCSVLine(String line, String separatorChar) {
        String regex = // puts a doublequoted field in group(1) and an unquoted field into group(2)
                "\\G(?:^|" + separatorChar + ")" +
                "(?:" +
                "\"" +
                "((?:[^\"]++|\"\")*+)" +
                "\"" +
                "|" +
                "([^\"" + separatorChar + "]*)" +
                ")";
        Matcher mMain = Pattern.compile(regex).matcher("");
        Matcher mQuote = Pattern.compile("\"\"").matcher("");
        Matcher mDouble = Pattern.compile(DOUBLE_REGEX_WITH_NAN).matcher("");
        
        List<Object> values = new ArrayList<>();
        mMain.reset(line);
        while (mMain.find()) {
            Object value;
            if (mMain.start(2) >= 0) {
                String field = mMain.group(2);
                if (mDouble.reset(field).matches()) {
                    value = Double.parseDouble(field);
                } else {
                    value = field;
                }
            } else {
                // If quoted, always use string
                value = mQuote.reset(mMain.group(1)).replaceAll("\"");
            }
            values.add(value);
        }
        return values;
    }
1340462
private URLPatternHolder convertStringToPattern(String line) {
        URLPatternHolder holder = new URLPatternHolder();
        Pattern compiledPattern;
        Perl5Compiler compiler = new Perl5Compiler();
        String perl5RegExp = line;
        try {
            compiledPattern = compiler.compile(perl5RegExp, Perl5Compiler.READ_ONLY_MASK);
            holder.setCompiledPattern(compiledPattern);
        } catch (MalformedPatternException mpe) {
            throw new IllegalArgumentException("Malformed regular expression: " + perl5RegExp);
        }

        if (logger.isDebugEnabled()) {
            logger.debug("Added regular expression: " + compiledPattern.getPattern().toString());
        }
        return holder;
    }
1149168
public static <C extends Collection<String>> C splitString(String line, char delim, C words) {
		return splitString(line, 0, line.length(), delim, words);
	}
1091724
public static void splitLine(final String line, final char delimiter,
      final String[] splitted) {
    int idxComma, idxToken = 0, fromIndex = 0;
    while ((idxComma = line.indexOf(delimiter, fromIndex)) != -1) {
      splitted[idxToken++] = line.substring(fromIndex, idxComma);
      fromIndex = idxComma + 1;
    }
    splitted[idxToken] = line.substring(fromIndex);
  }
445352
private String getClassName(String line) {
        String result = line.substring(line.indexOf(CSHARP_CLASS_NAME)
                + CSHARP_CLASS_NAME.length());
        if (result.contains("{")) {
            result = result.substring(0, result.indexOf("{"));
        }
        if (result.contains(":")) {
            result = result.substring(0, result.indexOf(":"));
        }
        return result.replaceAll("\\s", "");
    }
780339
private Value parse(String line) {
        int i = line.indexOf(" : ");
        if (i == -1) {
            throw new IllegalArgumentException("Malformed line in RI Query "
                    + "result (expected ' : ' delimiter): '" + line + "'");
        } else {
            return NTriplesUtil.parseValue(line.substring(i + 3), factory);
        }
    }
462692
public void parseTagedLine(String line) {
		String[] toks = line.split("(\\s|　| |\\t)+");
		words = new String[toks.length];
		tags = new String[toks.length];
		for(int i=0;i<toks.length;i++){
			String[] tt = toks[i].split("/");
			if(tt.length!=2)
				System.err.println("Wrong Format");
			words[i] = tt[0];
			tags[i]=tt[1];
		}
		
		
	}
1207931
public static String[] getDataFromLine(final String line, final String seperator,
		final boolean trim)
	{
		final StringTokenizer tokenizer = new StringTokenizer(line, seperator);
		final List<String> data = new ArrayList<>();
		while (tokenizer.hasMoreElements())
		{
			final String string = tokenizer.nextToken();
			if (trim)
			{
				data.add(string.trim());
			}
			else
			{
				data.add(string);
			}

		}
		final String[] splittedLine = data.toArray(new String[0]);
		return splittedLine;
	}
498743
public static String[] disectCommandLine(String line) {
		return StringSupport.split(line, "() ,;", "\"", false, false, false).toArray(new String[0]);
	}
85970
public static SubstitutedLine parseLine(String str, ParsingStateCallbackHandler callbackHandler, ParsingState initialState, boolean strict) throws CommandFormatException {
        return parseLine(str, callbackHandler, initialState, strict, null);
    }
789855
private void parseLine(final String line, final TemporalDataModelIF<Long, Long> dataset) {
        String[] toks;
        if (line.contains("::")) {
            toks = line.split("::");
        } else {
            toks = line.split("\t");
        }
        // user
        long userId = Long.parseLong(toks[USER_TOK]);
        // item
        long itemId = Long.parseLong(toks[ITEM_TOK]);
        // timestamp
        long timestamp = Long.parseLong(toks[TIME_TOK]);
        // preference
        double preference = Double.parseDouble(toks[RATING_TOK]);
        //////
        // update information
        //////
        dataset.addPreference(userId, itemId, preference);
        dataset.addTimestamp(userId, itemId, timestamp);
    }
865622
protected static E164CountryCode parse(String line) throws IOException {
        try {
            int pos = line.indexOf(' ');
            if (pos < 0) throw new IOException("Invalid format, could not parse prefix");
            String prefix = line.substring(0, pos);

            // rest of line is iso
            String iso = line.substring(pos+1).trim();

            // was there a name?
            if (iso == null || iso.equals("")) {
                throw new IOException("Country ISO was null or empty");
            }

            // create the new country code
            return new E164CountryCode(prefix, iso);
        } catch (Exception e) {
            throw new IOException("Failed while parsing country code for line: " + line, e);
        }
    }
671697
private void parseSemicolon( FormattableContainer currentRule ) {
        String selector = null;
        Operation params = null;
        StringBuilder builder = cachesBuilder;
        LOOP: for( ;; ) {
            char ch;
            try {
                ch = read();
            } catch( Exception e ) {
                ch = ';'; // a not terminated line is like a lime with semicolon
            }
            switch( ch ) {
                case ':':
                    if( isMixin( builder ) ) {
                        builder.append( ch );
                        continue LOOP;
                    }
                    String name = trim( builder );
                    strictMath = "font".equals( name );
                    Expression value = parseExpression( (char)0 );
                    strictMath = false;
                    ch = read();
                    switch( ch ) {
                        case '}': //last line in a block does not need a semicolon
//                            back( ch );
                            break;
                        case ';':
                            break;
                        default:
                            throw createException( "Unrecognized input: '" + ch + "'" );
                    }
                    currentRule.add( new RuleProperty( name, value ) );
                    return;
                case '@':
                    ch = read();
                    if( ch == '{' ) { // @{  --> a inline variable and not a variable declaration
                        builder.append( '@' );
                        builder.append( ch );
                        do {
                            ch = read();
                            builder.append( ch );
                        } while( ch != '}' );
                        break;
                    } else {
                        back( ch );
                    }
                    throwUnrecognizedInputIfAny( builder, ch );
                    variable( currentRule.getVariables(), currentRule );
                    return;
                case '/':
                    if( !comment( isWhitespace( builder ) ? currentRule : null ) ) {
                        builder.append( ch );
                    }
                    break;
                case '(':
                    if( !reader.nextIsMixinParam( false ) ) {
                        builder.append( ch );
                        break;
                    }
                    selector = trim( builder );
                    params = parseParameterList();
                    break;
                case ';':
                case '}':
                    String sel = trim( builder );
                    if( !sel.isEmpty() ) {
                        if( selector == null ) {
                            selector = sel;
                        } else {
                            selector += ' ' + sel; // "!important" attribute
                        }
                    }
                    if( selector != null ) {
                        if( selector.contains( ":extend(" ) ) {
                            LessExtend.addLessExtendsTo( currentRule, reader, selector );
                        } else {
                            Mixin mixin = new Mixin( reader, selector, params, currentRule.getMixins() );
                            currentRule.add( mixin );
                        }
                    }
                    return;
                default:
                    builder.append( ch );
            }
        }
    }
947978
private String[] extractDispositionInfo(String line) throws IOException {
    // Return the line's data as an array: disposition, name, filename
    String[] retval = new String[4];

    // Convert the line to a lowercase string without the ending \r\n
    // Keep the original line for error messages and for variable names.
    String origline = line;
    line = origline.toLowerCase();

    // Get the content disposition, should be "form-data"
    int start = line.indexOf("content-disposition: ");
    int end = line.indexOf(";");
    if (start == -1 || end == -1) {
      throw new IOException("Content disposition corrupt: " + origline);
    }
    String disposition = line.substring(start + 21, end).trim();
    if (!disposition.equals("form-data")) {
      throw new IOException("Invalid content disposition: " + disposition);
    }

    // Get the field name
    start = line.indexOf("name=\"", end);  // start at last semicolon
    end = line.indexOf("\"", start + 7);   // skip name=\"
    int startOffset = 6;
    if (start == -1 || end == -1) {
      // Some browsers like lynx don't surround with ""
      // Thanks to Deon van der Merwe, dvdm@truteq.co.za, for noticing
      start = line.indexOf("name=", end);
      end = line.indexOf(";", start + 6);
      if (start == -1) {
        throw new IOException("Content disposition corrupt: " + origline);
      }
      else if (end == -1) {
        end = line.length();
      }
      startOffset = 5;  // without quotes we have one fewer char to skip
    }
    String name = origline.substring(start + startOffset, end);

    // Get the filename, if given
    String filename = null;
    String origname = null;
    start = line.indexOf("filename=\"", end + 2);  // start after name
    end = line.indexOf("\"", start + 10);          // skip filename=\"
    if (start != -1 && end != -1) {                // note the !=
      filename = origline.substring(start + 10, end);
      origname = filename;
      // The filename may contain a full path.  Cut to just the filename.
      int slash =
        Math.max(filename.lastIndexOf('/'), filename.lastIndexOf('\\'));
      if (slash > -1) {
        filename = filename.substring(slash + 1);  // past last slash
      }
    }

    // Return a String array: disposition, name, filename
    // empty filename denotes no file posted!
    retval[0] = disposition;
    retval[1] = name;
    retval[2] = filename;
    retval[3] = origname;
    return retval;
  }