KeepChar - 指令碼與圖表函數
KeepChar() returns a string consisting of the first string ,'text', less any of the characters NOT contained in the second string, "keep_chars".
語法:
KeepChar(text, keep_chars)
傳回的資料類型: 字串
引數:
引數
text
|
原始字串。 |
keep_chars
|
包含 text 中要保存之字元的字串。 |
KeepChar ( 'a1b2c3','123' ) | Returns '123'. |
KeepChar ( 'a1b2c3','1234' ) | Returns '123'. |
KeepChar ( 'a1b22c3','1234' ) | Returns '1223'. |
KeepChar ( 'a1b2c3','312' ) | Returns '123'. |
T1:
Load
*,
keepchar(String1, String2) as KeepChar;
Load * inline [
String1, String2
'a1b2c3', '123'
];
結果
使用在載入指令碼中的 KeepChar 函數來顯示輸出的 Qlik Sense 表格。 string1 | String2 | KeepChar |
---|
a1b2c3 | 123 | 123 |