EndsWith – XpressDox

EndsWith tests the end of a string:

«If(EndsWith(Surname,'-Smith')»
«Surname»
is a double-barrelled name.
«SetV('FirstPart',substring(Surname,1,string-length(Surname) - 6))»«Comment(SetV(‘FirstPart’,string-before(‘-Smith’)) is equivalent)»
«End()»

«Name_of_Client»«If(not(EndsWith(ToLower(Name_of_Client),'s')))»'s«Else()»'«End()»