Subject: [xsl] Finding first difference between 2 text strings|
Date: Thu, 10 Sep 2009 10:10:44 -0400
The XSLT function "compare" will compare 2 strings and indicate which is alphabetically first. Is there any function, or simple transformation, that will tell me the position of the first character where the two strings differ? "compare" might determine this, but it isn't telling. I suppose strings can be compared in various ways internally, so the position of the first difference might not be a side-effect of "compare". Comparing strings can also be time consuming for long strings, so I'd like an "inexpensive" solution, if there is one. Any suggestions for finding the first difference in 2 strings (besides a linear march through the strings in my XSL transformation)? Thanks, Mike This email and any attachments are only for use by the intended recipient(s) and may contain legally privileged, confidential, proprietary or otherwise private information. Any unauthorized use, reproduction, dissemination, distribution or other disclosure of the contents of this e-mail or its attachments is strictly prohibited. If you have received this email in error, please notify the sender immediately and delete the original.