s1='abcde' s2='abCde1' ? "native version",StringDifference(m.s1,m.s2) ? "text version",CAST(CHRTRAN(StringDifference(m.s1,m.s2),0h00FF,'=#') AS M) ? "match chars on first string",StringGetMatch(m.s1,m.s2) * simple to do other functions FUNCTION StringDifference(s1,s2) * return a binary pattern: 00 match, FF unmatch LOCAL sDiffMask sDiffMask = BITXOR(CAST(m.s1 AS W),CAST(m.s2 AS W)) RETURN BITOR(BITNOT(CHRTRAN(m.sDiffMask ,0h0,0hFF)),m.sDiffMask) FUNCTION StringGetMatch(s1,s2) RETURN CAST(CHRTRAN(BITAND(BITNOT(StringDifference(@m.s1,@m.s2)),CAST(m.s1 AS W)),0H0," ") AS M)