dafny-lang / libraries

Libraries useful for Dafny programs
Other
43 stars 25 forks source link

Request: connecting Unicode logic to the string type #111

Closed robin-aws closed 1 year ago

robin-aws commented 1 year ago

src/Unicode has a fairly pure implementation of UTF-16 and UTF-8, but it uses bit vector types and doesn't use char or string at all. We definitely need a standard library that does (and the incoming JSON PR does itself, since it needs to encode a string in UTF-8), although this means we'll need at least some Dafny code that is duplicated to account for the difference in behavior from --unicode-char.

robin-aws commented 1 year ago

Addressed by #51 - see https://github.com/dafny-lang/libraries/blob/master/src/Unicode/UnicodeStrings.dfy