org.pentaho.di.core.Const.rtrim()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(5.0k)|赞(0)|评价(0)|浏览(127)

本文整理了Java中org.pentaho.di.core.Const.rtrim()方法的一些代码示例,展示了Const.rtrim()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Const.rtrim()方法的具体详情如下:
包路径:org.pentaho.di.core.Const
类名称:Const
方法名:rtrim

Const.rtrim介绍

[英]Right trim: remove spaces to the right of a string
[中]右修剪:删除字符串右侧的空格

代码示例

代码示例来源:origin: pentaho/pentaho-kettle

/**
 * @deprecated Use {@link Const#rtrim(String)} instead
 */
@Deprecated
public static final String rightTrim( String string ) {
 return Const.rtrim( string );
}

代码示例来源:origin: pentaho/pentaho-kettle

/**
 * Return the input string trimmed as specified.
 *
 * @param string
 *          String to be trimmed
 * @param trimType
 *          Type of trimming
 *
 * @return Trimmed string.
 */
public static String trimToType( String string, int trimType ) {
 switch ( trimType ) {
  case ValueMetaInterface.TRIM_TYPE_BOTH:
   return trim( string );
  case ValueMetaInterface.TRIM_TYPE_LEFT:
   return ltrim( string );
  case ValueMetaInterface.TRIM_TYPE_RIGHT:
   return rtrim( string );
  case ValueMetaInterface.TRIM_TYPE_NONE:
  default:
   return string;
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

public Value rtrim() {
 if ( isNull() ) {
  setType( VALUE_TYPE_STRING );
 } else {
  String s;
  if ( getType() == VALUE_TYPE_STRING ) {
   s = Const.rtrim( getString() );
  } else {
   s = Const.rtrim( toString() );
  }
  setValue( s );
 }
 return this;
}

代码示例来源:origin: pentaho/pentaho-kettle

break;
case YamlInputField.TYPE_TRIM_RIGHT:
 s = Const.rtrim( s );
 break;
case YamlInputField.TYPE_TRIM_BOTH:

代码示例来源:origin: pentaho/pentaho-kettle

protected String trim( String string ) {
 switch ( getTrimType() ) {
  case TRIM_TYPE_NONE:
   break;
  case TRIM_TYPE_RIGHT:
   string = Const.rtrim( string );
   break;
  case TRIM_TYPE_LEFT:
   string = Const.ltrim( string );
   break;
  case TRIM_TYPE_BOTH:
   string = Const.trim( string );
   break;
  default:
   break;
 }
 return string;
}

代码示例来源:origin: pentaho/pentaho-kettle

break;
case LDAPInputField.TYPE_TRIM_RIGHT:
 retval = Const.rtrim( retval );
 break;
case LDAPInputField.TYPE_TRIM_BOTH:

代码示例来源:origin: pentaho/pentaho-kettle

if ( getWorkDirectory() != null && !Utils.isEmpty( Const.rtrim( getWorkDirectory() ) ) ) {
 String vfsFilename = environmentSubstitute( getWorkDirectory() );
 File file = new File( KettleVFS.getFilename( KettleVFS.getFileObject( vfsFilename, this ) ) );

代码示例来源:origin: pentaho/pentaho-kettle

sb.append( " -d " );
String overrideName = meta.getDbNameOverride();
if ( Utils.isEmpty( Const.rtrim( overrideName ) ) ) {
 sb.append( environmentSubstitute( dns ) );
} else {

代码示例来源:origin: pentaho/pentaho-kettle

case LoadFileInputField.TYPE_TRIM_RIGHT:
 if ( meta.getEncoding() != null ) {
  data.filecontent = Const.rtrim( new String( data.filecontent, meta.getEncoding() ) ).getBytes();
 } else {
  data.filecontent = Const.rtrim( new String( data.filecontent ) ).getBytes();

代码示例来源:origin: pentaho/pentaho-kettle

if ( Utils.isEmpty( Const.rtrim( overrideName ) ) ) {
 sb.append( environmentSubstitute( dns ) );
} else {

代码示例来源:origin: pentaho/pentaho-kettle

break;
case PropertyInputField.TYPE_TRIM_RIGHT:
 value = Const.rtrim( value );
 break;
case PropertyInputField.TYPE_TRIM_BOTH:

代码示例来源:origin: pentaho/pentaho-kettle

String one = Const.rtrim( getString() );
String two = Const.rtrim( v.getString() );

代码示例来源:origin: pentaho/pentaho-kettle

r[i] = Const.rtrim( (String) rowobj[i] );
 break;
case FIELD_TYPE_I: // Numeric

代码示例来源:origin: pentaho/pentaho-kettle

break;
case GetXMLDataField.TYPE_TRIM_RIGHT:
 nodevalue = Const.rtrim( nodevalue );
 break;
case GetXMLDataField.TYPE_TRIM_BOTH:

代码示例来源:origin: pentaho/pentaho-kettle

switch ( trimType ) {
 case StringOperationsMeta.TRIM_RIGHT:
  rcode = Const.rtrim( rcode );
  break;
 case StringOperationsMeta.TRIM_LEFT:

代码示例来源:origin: pentaho/pentaho-kettle

break;
case RssInputField.TYPE_TRIM_RIGHT:
 valueString = Const.rtrim( valueString );
 break;
case RssInputField.TYPE_TRIM_BOTH:

代码示例来源:origin: pentaho/pentaho-kettle

break;
case LDIFInputField.TYPE_TRIM_RIGHT:
 Value = Const.rtrim( Value );
 break;
case LDIFInputField.TYPE_TRIM_BOTH:

代码示例来源:origin: pentaho/pentaho-kettle

public String getXML( int level ) throws KettleValueException {
 String retval = "";
 String indent1 = Const.rightPad( " ", level );
 String indent2 = Const.rightPad( " ", level + 1 );
 String indent3 = Const.rightPad( " ", level + 2 );
 retval += indent1 + XMLHandler.openTag( XML_TAG ) + Const.CR;
 retval += indent2 + XMLHandler.addTagValue( "negated", isNegated() );
 if ( getOperator() != OPERATOR_NONE ) {
  retval += indent2 + XMLHandler.addTagValue( "operator", Const.rtrim( getOperatorDesc() ) );
 }
 if ( isAtomic() ) {
  retval += indent2 + XMLHandler.addTagValue( "leftvalue", getLeftValuename() );
  retval += indent2 + XMLHandler.addTagValue( "function", getFunctionDesc() );
  retval += indent2 + XMLHandler.addTagValue( "rightvalue", getRightValuename() );
  if ( getRightExact() != null ) {
   retval += indent2 + getRightExact().getXML();
  }
 } else {
  retval += indent2 + "<conditions>" + Const.CR;
  for ( int i = 0; i < nrConditions(); i++ ) {
   Condition c = getCondition( i );
   retval += c.getXML( level + 2 );
  }
  retval += indent3 + "</conditions>" + Const.CR;
 }
 retval += indent2 + XMLHandler.closeTag( XML_TAG ) + Const.CR;
 return retval;
}

代码示例来源:origin: pentaho/pentaho-kettle

break;
case ExcelInputMeta.TYPE_TRIM_RIGHT:
 string = Const.rtrim( string );
 break;
case ExcelInputMeta.TYPE_TRIM_BOTH:

代码示例来源:origin: pentaho/pentaho-kettle

break;
case SalesforceInputField.TYPE_TRIM_RIGHT:
 value = Const.rtrim( value );
 break;
case SalesforceInputField.TYPE_TRIM_BOTH:

相关文章