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

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

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

Const.removeCRLF介绍

[英]Remove CR / LF from String - Better performance version - Doesn't NPE - 40 times faster on an empty string - 2 times faster on a mixed string - 25% faster on 2 char string with only CRLF in it
[中]从字符串中删除CR/LF-性能更好的版本-不NPE-空字符串快40倍-混合字符串快2倍-仅包含CRLF的2字符字符串快25%

代码示例

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

public static String removeCRLF( ValueMetaInterface metaA, Object dataA ) {
 if ( dataA == null ) {
  return null;
 }
 return Const.removeCRLF( dataA.toString() );
}

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

public static String removeCRLF( Context actualContext, Scriptable actualObject, Object[] ArgList,
  Function FunctionContext ) {
  if ( ArgList.length == 1 ) {
   try {
    if ( isNull( ArgList[0] ) ) {
     return null;
    } else if ( isUndefined( ArgList[0] ) ) {
     return (String) Context.getUndefinedValue();
    }

    return Const.removeCRLF( Context.toString( ArgList[0] ) );
   } catch ( Exception e ) {
    throw Context.reportRuntimeError( "The function call removeCRLF is not valid" );
   }
  } else {
   throw Context.reportRuntimeError( "The function call removeCRLF is not valid" );
  }
 }
}

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

break;
case StringOperationsMeta.REMOVE_SPECIAL_CHARACTERS_CRLF:
 rcode = Const.removeCRLF( rcode );
 break;
case StringOperationsMeta.REMOVE_SPECIAL_CHARACTERS_TAB:

相关文章

微信公众号

最新文章

更多