percent

package module
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2020 License: MIT Imports: 1 Imported by: 25 modules, 23 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Percent

Package percent escapes strings using percent-encoding

Docs

Documentation

Overview

Package percent escapes strings using percent-encoding

Example
percentEncoded := Encode("a.b/c d", "/. ")
fmt.Println(percentEncoded)
fmt.Println(Decode(percentEncoded))
Output:
a%2Eb%2Fc%20d
a.b/c d

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode added in v0.2.0

func Decode(s string) string

Decode does the inverse transformation of Encode, converting each 3-byte encoded substring of the form "%AB" into the hex-decoded byte 0xAB

func Encode added in v0.2.0

func Encode(s string, charsToEncode string) string

Encode escapes the string using percent-encoding, converting the runes found in charsToEncode with hex-encoded %AB sequences

Types

This section is empty.

Jump to

Keyboard shortcuts

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