本文整理了Java中org.pentaho.di.core.Const.splitString()
方法的一些代码示例,展示了Const.splitString()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Const.splitString()
方法的具体详情如下:
包路径:org.pentaho.di.core.Const
类名称:Const
方法名:splitString
[英]Convert strings separated by a character into an array of strings.
Example: a;b;c;d == new String[] { a, b, c, d }
[中]将由字符分隔的字符串转换为字符串数组。Example: a;b;c;d == new String[] { a, b, c, d }
代码示例来源:origin: pentaho/pentaho-kettle
/**
* Convert strings separated by a character into an array of strings.
* <p>
* <code>
Example: a;b;c;d == new String[] { a, b, c, d }
* </code>
*
* @param string
* The string to split
* @param separator
* The separator used.
* @return the string split into an array of strings
*/
public static String[] splitString( String string, char separator ) {
return splitString( string, separator, false );
}
代码示例来源:origin: pentaho/pentaho-kettle
/**
* Split the given string using the given delimiter and enclosure strings.
*
* The delimiter and enclosures are not regular expressions (regexes); rather they are literal strings that will be
* quoted so as not to be treated like regexes.
*
* This method expects that the data contains an even number of enclosure strings in the input; otherwise the results
* are undefined
*
* @param stringToSplit
* the String to split
* @param delimiter
* the delimiter string
* @param enclosure
* the enclosure string
* @return an array of strings split on the delimiter (ignoring those in enclosures), or null if the string to split
* is null.
*/
public static String[] splitString( String stringToSplit, String delimiter, String enclosure ) {
return splitString( stringToSplit, delimiter, enclosure, false );
}
代码示例来源:origin: pentaho/pentaho-kettle
inList = Const.splitString( fieldMeta2.getString( field2 ), ';', true );
for ( int i = 0; i < inList.length; i++ ) {
inList[i] = inList[i] == null ? null : inList[i].replace( "\\", "" );
代码示例来源:origin: pentaho/pentaho-kettle
String[] valueParts = Const.splitString( valueToSplit, data.delimiter, data.enclosure, removeEnclosure );
int prev = 0;
for ( int i = 0; i < meta.getFieldsCount(); i++ ) {
代码示例来源:origin: pentaho/pentaho-kettle
String[] fieldNames = Const.splitString( line, meta.getDelimiter() );
代码示例来源:origin: pentaho/pentaho-kettle
String[] fieldNames = Const.splitString( line, meta.getDelimiter() );
内容来源于网络,如有侵权,请联系作者删除!