Documentation
¶
Index ¶
- func AppendIfNotExists(slice []string, s string, addToFront bool) []string
- func Contains(slice []string, s string) bool
- func ContainsAllCharacters(str, characters string) bool
- func ContainsAllCharactersCaseSensitive(str, characters string) bool
- func CopyFile(src, dest string) error
- func Dirwalk(dir string, depth int) []string
- func ExistsFile(filename string) bool
- func FindOverlap(range1Start, range1End, range2Start, range2End int) (int, int)
- func JoinBytes(source [][]byte) []byte
- func LastPartOfPath(path string) string
- func MaxValueIndex(array []int) (maxValueIndex int)
- func MoveElement(slice []string, index int, moveToStart bool) []string
- func RemoveSymbols(s string) string
- func ReverseUTF8Bytes(bytes []byte) []byte
- func RuneToBytes(ch rune) []byte
- func RuneWidth(ch rune) int
- func RunesToBytes(runes []rune) []byte
- func SameFile(path1, path2 string) bool
- func Swap[T any](a *T, b *T)
- func TabWidth(cursorPosition int, tabWidth int) int
- func Threshold(maxThreshold, screenSize int) int
- func WidthKindString(ch rune) string
- type Rect
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendIfNotExists ¶
Add s to slice. If s exists in slice, return slice as is. Add s to the beginning of slice if addToFront is true.
func ContainsAllCharacters ¶
Check if a string contains a specific character case insensitive
func ContainsAllCharactersCaseSensitive ¶
Check if a string contains a specific character case sensitive
func ExistsFile ¶
func FindOverlap ¶
Find overlap between two ranges Range is 2 integers greater than or equal to 0
func LastPartOfPath ¶
Return last part of path Trim right side path separator and split by separator
func MaxValueIndex ¶
func ReverseUTF8Bytes ¶
ReverseUTF8Bytes は、バイトスライスを逆順にする関数です。
func RuneToBytes ¶
func RuneWidth ¶
Guess the width of the rune for console screen.
種類の説明:
- width.Neutral: 幅が中立的である文字(例:アルファベット、数字、記号)は幅が1です。
- width.EastAsianWide: 全角文字(例:漢字、ひらがな、カタカナ)は幅が2です。
- width.EastAsianNarrow: 半角文字(例:英数字、一部の記号)は幅が1です。
- width.EastAsianAmbiguous: 幅が曖昧な文字(例:一部の漢字、一部のひらがな、一部のカタカナ)は幅が2です。
- width.EastAsianFullwidth: 全角文字(例:漢字、ひらがな、カタカナ)は幅が2です。
- width.EastAsianHalfwidth: 半角文字(例:英数字、一部の記号)は幅が1です。
func WidthKindString ¶
Determine the character type and return the result string
Types ¶
Click to show internal directories.
Click to hide internal directories.