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

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

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

Const.ltrim介绍

[英]Left trim: remove spaces to the left of a String.
[中]左修剪:删除字符串左侧的空格。

代码示例

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

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

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

@Override
public long getInteger() {
 return Const.toLong( Const.ltrim( string ), 0L ); // Remove the leading space to make "int to string to int"
                          // conversion possible.
}

代码示例来源: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

dRC = ( formatter.parse( Const.ltrim( sArg1 ) ) ).doubleValue();
} catch ( Exception e ) {
 throw new RuntimeException( "Could not convert the given String : " + e.getMessage() );

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

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

代码示例来源: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

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

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

dRC = ( formatter.parse( Const.ltrim( sArg1 ) ) ).doubleValue();
} catch ( Exception e ) {
 throw Context.reportRuntimeError( "Could not convert the given String : " + e.getMessage() );

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

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

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

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

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

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

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

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

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

break;
case StringOperationsMeta.TRIM_LEFT:
 rcode = Const.ltrim( rcode );
 break;
case StringOperationsMeta.TRIM_BOTH:

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

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

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

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

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

switch ( meta.getField()[rowcolumn].getTrimType() ) {
 case ExcelInputMeta.TYPE_TRIM_LEFT:
  string = Const.ltrim( string );
  break;
 case ExcelInputMeta.TYPE_TRIM_RIGHT:

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

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

相关文章