Categorygithub.com/dualm/common
modulepackage
0.1.9
Repository: https://github.com/dualm/common.git
Documentation: pkg.go.dev

# Functions

BytesToAscii,从raw中提取包含charCount个字符的count个字符串.
BytesToFloat32, 从raw中提取count个32位浮点数,精度为prec,并转换为字符串切片.
BytesToInt16, 从raw中提取count个16位整数,并转换为字符串切片.
BytesToInt32, 从raw中提取count个32位整数,并转换为字符串切片.
No description provided by the author
No description provided by the author
No description provided by the author
MakeFile: 生成临时文件、缓存文件、日志文件等,返回该文件供读写。在生成文件前,会扫描dir,如果存在一个符合pattern的文件文件就复用 否则清除路径下的所有符合pattern的文件清除。如果没有任何符合patter的文件,则创建一个新的 dir: 文件路径 pattern: 文件名样式,最后一个"*"会使用随机字符串进行替代 readOnly: 是否是只读模式.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
MakePath, 创建文件夹路径,如果不存在就创建一个,如果存在一个就复用,如果存在多个就全部清理并生成新的 dir: 文件夹上级路径,如果为空则使用os.TempDir() pattern: 最后一个“*”会使用一串随机字符替代.
NewBuffer,从buffer池中取出并重置一个Buffer实例,将data写入后返回.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
StringToByteByLength,返回长度为length的字符串s的字节切片.
Trim, 移除s前端、后端非字母和数字的内容.
TrimLittleEndianUint16ToString, 大端编码的word字符串解码.
TrimByteToString,移除b中非数据和非字母的内容,并返回字符串.
TrimLittleEndianUint16ToString, 小端编码的word字符串解码.
TrimMap,移除s中所有value里的非字母和数字的部分.

# Constants

No description provided by the author

# Structs

No description provided by the author
No description provided by the author