mirror of
https://github.com/atom/atom.git
synced 2026-02-18 10:31:54 -05:00
Add specs for partial surrogate pairs
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user