LongestCommonSubsequence

Methods
2
Fields
None

Getting one

LongestCommonSubsequence.new()

Methods

MethodReturnsDescription
longestCommonSubsequence(string, string)stringThe longest common subsequence of left and right; where several are longest, the one a table walk picks (from the end, preferring to dr…
new()LongestCommonSubsequenceA new scorer. It keeps no state: one instance serves every call.

Returned by

MethodReturnsDescription
LongestCommonSubsequenceClass.newLongestCommonSubsequenceA new scorer. It keeps no state: one instance serves every call.

Method details

longestCommonSubsequence

longestCommonSubsequence: (LongestCommonSubsequence, string, string) -> string

The longest common subsequence of left and right; where several are longest, the one a table walk picks (from the end, preferring to drop from right on a tie). Where it holds one half of a character above U+FFFF, the string carries that lone surrogate in its WTF-8 form (three bytes, ED A0..BF xx). That form is not UTF-8: utf8.len answers nil for it, and a member that takes a string (the CharMatchers, StringUtils.stripAccents) refuses it with "string is not valid UTF-8", so code that passes such a result on checks utf8.len first. Item names are ASCII. Raises java.lang.OutOfMemoryError where the table would pass 16,777,216 cells (two strings of about 4,096 characters); apply has no limit.