Movatterモバイル変換


[0]ホーム

URL:


strings

package
v2.26.0Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2025 License:AGPL-3.0Imports:6Imported by:0

Details

Repository

github.com/coder/coder

Links

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

funcJoinWithConjunction

func JoinWithConjunction(s []string)string

JoinWithConjunction joins a slice of strings with commas except for the lasttwo which are joined with "and".

funcTruncateadded inv2.5.0

func Truncate(sstring, nint)string

Truncate returns the first n characters of s.

funcUISanitizeadded inv2.25.0

func UISanitize(instring)string

UISanitize sanitizes a string for display in the UI.The following transformations are applied, in order:- HTML tags are removed using bluemonday's strict policy.- ANSI escape codes are stripped using stripansi.- Consecutive backslashes are replaced with a single backslash.- Non-printable characters are removed.- Whitespace characters are replaced with spaces.- Multiple spaces are collapsed into a single space.- Leading and trailing whitespace is trimmed.

Types

This section is empty.

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp