Add specs for partial surrogate pairs

This commit is contained in:
Kevin Sawicki
2013-06-04 12:16:45 -07:00
parent f63866b2a2
commit 3d1ca5abb1
2 changed files with 7 additions and 1 deletions

View File

@@ -15,7 +15,7 @@ isLowSurrogate = (string, index) ->
# index - The {Number} index to look for a surrogate pair at.
#
# Return a {Boolean}.
isSurrogatePair = (string, index) ->
isSurrogatePair = (string, index=0) ->
isHighSurrogate(string, index) and isLowSurrogate(string, index + 1)
# Get the number of characters in the string accounting for surrogate pairs.