Trim whitespace(修剪空白字符(Trim whitespace))¶
Supported in: Batch, Faster, Streaming
Trims whitespace at beginning and end of string. Whitespace is defined as characters in any of: 1) Unicode's \p{whitespace} set, 2) Java's String#trim() method, or 3) Java's Character#isWhitespace() method.
Expression categories: Data preparation, String
Declared arguments¶
- Expression: Input string to trim whitespace from.
Expression\
Output type: String
Examples¶
Example 1: Base case¶
Argument values:
- Expression: hello world
Output: hello world
Example 2: Null case¶
Argument values:
- Expression: null
Output: null
中文翻译¶
修剪空白字符(Trim whitespace)¶
支持:批处理(Batch)、快速处理(Faster)、流处理(Streaming)
修剪字符串开头和结尾的空白字符。空白字符定义为以下任一集合中的字符:1) Unicode 的 \p{whitespace} 集合,2) Java 的 String#trim() 方法,或 3) Java 的 Character#isWhitespace() 方法。
表达式类别: 数据准备(Data preparation)、字符串(String)
声明参数¶
- 表达式(Expression): 需要修剪空白字符的输入字符串。
Expression\
输出类型: String
示例¶
示例 1:基本情况¶
参数值:
- 表达式: hello world
输出: hello world
示例 2:空值情况¶
参数值:
- 表达式: null
输出: null