encodeuricomponent

package module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 6, 2023 License: Apache-2.0 Imports: 2 Imported by: 1

README

go-encodeuricomponent

A library that replicates the behavior of the encodeURIComponent JavaScript function

Notice

The current implementation doesn't detect lead and trail surrogates.

The Javascript encodeURIComponent returns an error when one attempts to encode a lone low/high surrogate.

This library doesn't, at the moment. Supporting this feature is a very valuable way to start contributing!

Get to know more by reading the mdn web docs.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeURIComponent

func EncodeURIComponent(input string) string

EncodeURIComponent encodes a URI by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character.

It will use 4 escape sequences only for characters composed of 2 surrogate characters.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL