Edit Content
Click on the Edit Content button to edit/add the content.

EndsWith

Testing parts of a string

1. The StartsWith function is used to test whether a string starts with a given string: «If(StartsWith(Surname,’van ‘)»«Title» «Surname» is probably of Dutch descent.«End()» «If(StartsWith(Surname,’van ‘)»«SetV(‘LastPart’,substring-after(Surname,’van ‘))»«End()» In previous versions this command was known as

Read More »

The EndsWith Function

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()»

Read More »

The StartsWith Function

The StartsWith function (an XSLT function) is used to test whether a string starts with a given string: «If(StartsWith(Surname,’van ‘)»«Title» «Surname» is probably of Dutch descent.«End()» «If(StartsWith(Surname,’van ‘)»«Setv(‘LastPart’,substring-after(Surname,’van ‘))»«End()» In previous versions this command was

Read More »

The Contains Function

This function is used to test for a string anywhere inside another string, and would appear inside a command such as If, When or Iif.   Example: «If(contains(Surname,’prmzl’))»«Surname» is not an English name.«End()»   Related

Read More »