Skip to content

Make functions to read and write code points public #307

Closed
@fzhinkin

Description

@fzhinkin

Currently, there's no way to read a code point from a source containing UTF-8 encoded data or write a single code point to sink encoding it to UTF-8 along the way.

Corresponding functions exist but are hidden: #136 (comment)

It's time to make them public under the following names:

  • Sink.writeCodePointValue(value: Int)
  • Source.readCodePointValue(): Int

There is no Utf8 in the names for consistency with readString/writeString, but there is a Value suffix.
At some point, CodePoint type will be added to Kotlin Stdlib, so it'll be nice to preserve readCointPoint/writeCodePoint names for it. However, such a type most likely will have a value: Int property and the names mentioned above are referring to that property.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions