lo48576 / iri-string

String types for URIs/IRIs.
Apache License 2.0
15 stars 3 forks source link

Conversion between IRIs and URIs #13

Closed lo48576 closed 2 years ago

lo48576 commented 2 years ago

See https://www.rfc-editor.org/rfc/rfc3987.html#section-3.1 and https://www.rfc-editor.org/rfc/rfc3987.html#section-3.2.

lo48576 commented 2 years ago

At least I want IRI-to-URI mappings, and it would be useful.

lo48576 commented 2 years ago

Implemented at f30f707a62846d3e85381997372ecfe084dce5c4.

I'll add examples and tests later.

lo48576 commented 2 years ago

Released as v0.5.0-beta.4. Note that this version contains breaking changes since beta.3.

lo48576 commented 2 years ago

I'm not willing to add URI-to-IRI conversion (not identity conversion, but with percent-decoding) at least for now. Report a new issue if someone wants that feature.

Note that identity conversion from URI to IRI is already provided.

lo48576 commented 2 years ago

Fallible IRI-to-URI cast would also be useful and can be implemented efficiently, as the only additional condition is absence of non-ASCII characters.

lo48576 commented 2 years ago

Fallible IRI-to-URI cast is implemented at 0d63d01c916f.