strKeep Function

Applies To: Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012

Builds a string from only the characters in the first input string that are specified to be kept by the second string.

str strKeep(str _text1, str _text2)





The string with the characters that can be used to build an output string.


The string that specified which characters must be kept for the output string.

Return Value

A string of kept characters.


  • strKeep("ABBCDDEFGHB","BCD"); //Returns the string "BBCDDB".

  • strKeep("abcZcba","bc") //Returns the string "bccb".

The strKeep function is complementary to the strRem function.

See also

subStr Function

strDel Function

strIns Function

strRem Function

strLTrim Function

strRTrim Function

Announcements: To see known issues and recent fixes, use Issue search in Microsoft Dynamics Lifecycle Services (LCS).