Skip to content

Instantly share code, notes, and snippets.

@ryankennedy
Created September 11, 2015 05:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryankennedy/33540e44769220db4713 to your computer and use it in GitHub Desktop.
Save ryankennedy/33540e44769220db4713 to your computer and use it in GitHub Desktop.
node trying to do substring on unicode
$ node substring.js πŸ™…πŸΏ
πŸ™…πŸΏ.substring(0, 1) = οΏ½
πŸ™…πŸΏ.substring(0, 2) = πŸ™…
πŸ™…πŸΏ.substring(0, 3) = πŸ™…οΏ½
πŸ™…πŸΏ.substring(0, 4) = πŸ™…πŸΏ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment