Skip to content

Instantly share code, notes, and snippets.

@PollRobots
Created February 1, 2013 06:42
Show Gist options
  • Select an option

  • Save PollRobots/4689783 to your computer and use it in GitHub Desktop.

Select an option

Save PollRobots/4689783 to your computer and use it in GitHub Desktop.
let currentCharacter (s:string) i =
if i >= s.Length then None
else if Char.IsSurrogatePair(s, i) then Some s.[i..i+1] else Some s.[i..i]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment