encoding

package
v2.0.0-beta2.0...-114790f Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MergeCommaSeparated

func MergeCommaSeparated(s1, s2 string) string

MergeCommaSeparated accepts two strings, both representing a comma-separated list of values, which are split into their constituted values and returned as a merged, dupe-killed list of values, separated by comma and space. The returned order is all unique values in s1, followed by the unique values from s2 not present in s1

Example Input: s1="zstd, gzip,deflate, gzip" s2="br,gzip, deflate" Example Output: "zstd, gzip, deflate, br"

func MergeDelimeterSeparated

func MergeDelimeterSeparated(s1, s2, delimiter string, pad bool) string

MergeDelimeterSeparated accepts two strings, both representing a delimiter- separated list of values, which are split into their constituted values on the delimiter and returned as a merged, dupe-killed list. Whitespace on either side of the delimiter are trimmed. This is a simple replacement and does not recognize escape sequences, etc. When pad is true, the merged list will include a space following each delimiter instance.

Types

This section is empty.

Directories

Path Synopsis
Package gzip provides gzip capabilities for byte slices
Package gzip provides gzip capabilities for byte slices

Jump to

Keyboard shortcuts

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