Skip to main content Skip to complementary content

KeepChar - script and chart function

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)

Return data type: string


KeepChar arguments
Argument Description
text The original string.
keep_chars A string containing the characters in text to be kept.

Examples and results:  

Examples and results
Example Result
KeepChar ( 'a1b2c3','123' ) Returns '123'.
KeepChar ( 'a1b2c3','1234' ) Returns '123'.
KeepChar ( 'a1b22c3','1234' ) Returns '1223'.
KeepChar ( 'a1b2c3','312' ) Returns '123'

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!

Join the Analytics Modernization Program

Remove banner from view

Modernize without compromising your valuable QlikView apps with the Analytics Modernization Program. Click here for more information or reach out: