GO語言"strconv"包中"IsPrint"函數的用法及代碼示例。
用法:
func IsPrint(r rune) bool
IsPrint 報告符文是否被 Go 定義為可打印,與 unicode.IsPrint 的定義相同:字母、數字、標點符號、符號和 ASCII 空格。
例子:
package main
import (
"fmt"
"strconv"
)
func main() {
c := strconv.IsPrint('\u263a')
fmt.Println(c)
bel := strconv.IsPrint('\007')
fmt.Println(bel)
}
輸出:
true false
相關用法
- GO IsDigit用法及代碼示例
- GO IsAbs用法及代碼示例
- GO IsGraphic用法及代碼示例
- GO IsNotExist用法及代碼示例
- GO IsLower用法及代碼示例
- GO IsNumber用法及代碼示例
- GO IsUpper用法及代碼示例
- GO IsLetter用法及代碼示例
- GO IsTitle用法及代碼示例
- GO IsSpace用法及代碼示例
- GO Is用法及代碼示例
- GO Itoa用法及代碼示例
- GO IP.IsPrivate用法及代碼示例
- GO IP.Equal用法及代碼示例
- GO Index.Lookup用法及代碼示例
- GO IP.IsLinkLocalMulticast用法及代碼示例
- GO IndexByte用法及代碼示例
- GO Int.Scan用法及代碼示例
- GO IP用法及代碼示例
- GO Ints用法及代碼示例
注:本文由純淨天空篩選整理自golang.google.cn大神的英文原創作品 IsPrint。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。