Movatterモバイル変換


[0]ホーム

URL:


truncate

package
v1.92.2Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2025 License:BSD-3-ClauseImports:0Imported by:2

Details

Repository

github.com/tailscale/tailscale

Links

Documentation

Overview

Package truncate provides a utility function for safely truncating UTF-8strings to a fixed length, respecting multi-byte codepoints.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

funcString

func String[String ~string | ~[]byte](s String, nint) String

String returns a prefix of a UTF-8 string s, having length no greater than nbytes. If s exceeds this length, it is truncated at a point ≤ n so that theresult does not end in a partial UTF-8 encoding. If s is less than or equalto this length, it is returned unmodified.

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