diff options
| -rw-r--r-- | lib/utils.coffee | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/lib/utils.coffee b/lib/utils.coffee index 56f00dd2..c06d8ac5 100644 --- a/lib/utils.coffee +++ b/lib/utils.coffee @@ -199,16 +199,6 @@ Utils = return true if re.test string false - # Calculate the length of the longest shared prefix of a list of strings. - longestCommonPrefix: (strings) -> - return 0 unless 0 < strings.length - strings.sort (a,b) -> a.length - b.length - [ shortest, strings... ] = strings - for ch, index in shortest.split "" - for str in strings - return index if ch != str[index] - return shortest.length - # Convenience wrapper for setTimeout (with the arguments around the other way). setTimeout: (ms, func) -> setTimeout func, ms |
