package
1.8.7
Repository: https://github.com/abulo/ratel.git
Documentation: pkg.go.dev

# Functions

Abs abs().
No description provided by the author
Addslashes addslashes().
No description provided by the author
ArrayChunk array_chunk().
ArrayColumn array_column().
ArrayCombine array_combine().
ArrayFill array_fill().
ArrayFlip array_flip().
ArrayKeyExists array_key_exists().
No description provided by the author
ArrayKeys array_keys().
ArrayMerge array_merge().
No description provided by the author
ArrayPad array_pad().
No description provided by the author
ArrayPop array_pop() Pop the element off the end of slice.
ArrayPush array_push() Push one or more elements onto the end of slice.
ArrayRand array_rand().
ArrayRandMap 随即.
ArrayRemoveRepeatedElement 数组去重.
ArrayReverse array_reverse().
ArrayShift array_shift() Shift an element off the beginning of slice.
ArraySlice array_slice().
ArrayStringUniq 数组去重.
ArrayUnshift array_unshift() Prepend one or more elements to the beginning of a slice.
ArrayValues array_values().
No description provided by the author
No description provided by the author
No description provided by the author
Base64Decode base64_decode().
Base64Encode base64_encode().
BaseConvert base_convert().
Basename basename().
Bin2hex bin2hex().
Bindec bindec().
No description provided by the author
Ceil ceil().
Checkdate checkdate() Validate a Gregorian date.
Chmod chmod().
Chown chown().
Chr chr().
ChunkSplit chunk_split().
ConvertBson 构建 bson.D 查询数据.
Copy copy().
Crc32 crc32().
Date date().
DateTimeParse 时间解析.
DateToJulian converts a date to a Julian day number.
Day 获取起止日期中的天 s,e Y-m-d.
DebugFormat debug.
Decbin decbin().
Dechex dechex().
Decoct decoct().
Delete delete().
Dial dial 指定的端口,失败返回错误.
Die die().
查询是否被整除.
No description provided by the author
Echo echo.
Empty empty().
Exec exec() returnVar, 0: succ; 1: fail Return the last line from the result of the command.
Exit exit().
Explode explode().
ExtractIP returns a real ip.
Fclose fclose().
Fgetcsv fgetcsv().
FileExists file_exists().
FileGetContents file_get_contents().
Filemtime filemtime().
FilePutContents file_put_contents().
FileSize filesize().
Floor floor().
No description provided by the author
No description provided by the author
FormatDuring 格式化秒.
No description provided by the author
FunctionName ...
GetAppRootPath 获取应用程序根目录.
GetCurrentDirectory 获取当前目录.
Getcwd getcwd().
Getenv getenv().
GethostByAddr GethostByAddr() Get the Internet host name corresponding to a given IP address.
GethostByName GethostByName() Get the IPv4 address corresponding to a given Internet host name.
GethostByNamel GethostByNamel() Get a list of IPv4 addresses corresponding to a given Internet host name.
Gethostname gethostname().
GetHourDiffer 获取相差时间.
GetIPs ...
GetLocalIP ...
GetLocalIP ...
GetMacAddrs ...
No description provided by the author
GetParentDirectory 获取上级目录.
GetTimeZone 获取时区.
Glob glob().
Hex2bin hex2bin().
Hexdec hexdec().
Day 获取起止日期中的小时 YmdH.
Htmlentities htmlentities().
HTMLEntityDecode html_entity_decode().
HTTPBuildQuery http_build_query().
Implode implode().
InArray in_array() haystack supported types: slice, array or map.
InMultiArray in_array() haystack supported types: slice, array or map.
No description provided by the author
IP2long ip2long() IPv4.
IsDir is_dir().
IsFile is_file().
IsNan is_nan().
IsNumeric is_numeric() Numeric strings consist of optional sign, any number of digits, optional decimal part and optional exponential part.
ISOWeekday returns the ISO 8601 weekday number of given day.
IsReadable is_readable().
IsWriteable is_writeable().
No description provided by the author
JSONDecode json_decode().
JSONEncode json_encode().
JulianToDate converts a Julian day number to a date.
LcFirst LcFirst().
Levenshtein levenshtein() costIns: Defines the cost of insertion.
LocalListener 随机一个本地端口,返回listener.
Long2ip long2ip() IPv4.
Ltrim ltrim().
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Max max().
MbStrlen mb_strlen().
Md5 md5().
Md5File md5_file().
MemoryGetUsage memory_get_usage() return in bytes.
Min min().
Mkdir mkdir().
MkdirAll 创建文件夹.
Month 获取当前月份前一年的月份 d Y-m-d.
MonthDate 获取当前日期的当月的第一天和最后一天.
判断二维数组里面是不是只有一条数据.
No description provided by the author
NextMonthDate 获取当前日期的下个月的第一天和最后一天.
Nl2br nl2br() \n\r, \r\n, \r, \n.
Now time.Now().
NumberFormat number_format() decimals: Sets the number of decimal points.
Octdec Octdec().
Ord ord().
Pack pack().
ParseStr parse_str() f1=m&f2=n -> map[f1:m f2:n] f[a]=m&f[b]=n -> map[f:map[a:m b:n]] f[a][a]=m&f[a][b]=n -> map[f:map[a:map[a:m b:n]]] f[]=m&f[]=n -> map[f:[m n]] f[a][]=m&f[a][]=n -> map[f:map[a:[m n]]] f[][]=m&f[][]=n -> map[f:[map[]]] // Currently does not support nested slice.
ParseURL parse_url() Parse a URL and return its components -1: all; 1: scheme; 2: host; 4: port; 8: user; 16: pass; 32: path; 64: query; 128: fragment.
ParseURLRaw parses raw into URL.
Passthru passthru() returnVar, 0: succ; 1: fail.
Pathinfo pathinfo() -1: all; 1: dirname; 2: basename; 4: extension; 8: filename Usage: Pathinfo("/home/go/path/src/php2go/php2go.go", 1|2|4|8).
Pi pi().
Ping 调用http://ip:port/health 接口, 失败返回错误.
Pipeline gets aggregation pipeline from a string.
NextMonthDate 获取当前日期的上个月的第一天和最后一天.
Putenv putenv() The setting, like "FOO=BAR".
Quotemeta quotemeta().
Rand rand() Range: [0, 2147483647].
Random 随机字符串.
Rawurldecode rawurldecode().
Rawurlencode rawurlencode().
Realpath realpath().
Rename rename().
Round round().
Rtrim rtrim().
SetTimeZone 设置时区.
Sha1 sha1().
Sha1File sha1_file().
SimilarText similar_text().
Sleep sleep().
Soundex soundex() Calculate the soundex key of a string.
分割字符串 p 字符串, split 分隔符 , space 是否需要保留文字中的空格.
StartDate returns the starting date (Monday) of the given ISO 8601 week.
Stat stat().
No description provided by the author
StringToDate attempts to parse a string into a time.Time type using a predefined list of formats.
Stripos stripos().
Stripslashes stripslashes().
StrLastChar 删除最后一个.
Strlen strlen().
StrPad 填充字符串.
Strpos strpos().
StrRepeat str_repeat().
StrReplace str_replace().
Strrev strrev().
StrRipos StrRipos().
StrRpos StrRpos().
StrShuffle str_shuffle().
Strstr strstr().
StrToInt 字符串换数字.
No description provided by the author
StrToLower StrToLower().
StrToTime StrToTime() StrToTime("02/01/2006 15:04:05", "02/01/2016 15:04:05") == 1451747045 StrToTime("3 04 PM", "8 41 PM") == -62167144740.
StrToUpper StrToUpper().
Strtr strtr() If the parameter length is 1, type is: map[string]string Strtr("baab", map[string]string{"ab": "01"}) will return "ba01" If the parameter length is 2, type is: string, string Strtr("baab", "ab", "01") will return "1001", a => 0; b => 1.
StrTrim 去除空格.
StrWordCount str_word_count().
Substr substr().
System system() returnVar, 0: succ; 1: fail Returns the last line of the command output on success, and "" on failure.
Tag 数据标签.
Ternary Ternary expression max := Ternary(a > b, a, b).(int).
Time time().
Timestamp 毫秒.
ToBool casts an interface to a bool type.
ToBoolE casts an interface to a bool type.
ToBoolSlice casts an interface to a []bool type.
ToBoolSliceE casts an interface to a []bool type.
ToDuration casts an interface to a time.Duration type.
ToDurationE casts an interface to a time.Duration type.
ToDurationSlice casts an interface to a []time.Duration type.
ToDurationSliceE casts an interface to a []time.Duration type.
ToFloat32 casts an interface to a float32 type.
ToFloat32E casts an interface to a float32 type.
ToFloat64 casts an interface to a float64 type.
ToFloat64E casts an interface to a float64 type.
ToInt casts an interface to an int type.
ToInt16 casts an interface to an int16 type.
ToInt16E casts an interface to an int16 type.
ToInt32 casts an interface to an int32 type.
ToInt32E casts an interface to an int32 type.
ToInt64 casts an interface to an int64 type.
ToInt64E casts an interface to an int64 type.
ToInt8 casts an interface to an int8 type.
ToInt8E casts an interface to an int8 type.
ToIntE casts an interface to an int type.
ToIntSlice casts an interface to a []int type.
ToIntSliceE casts an interface to a []int type.
ToSlice casts an interface to a []interface{} type.
ToSliceE casts an interface to a []interface{} type.
ToString casts an interface to a string type.
ToStringE casts an interface to a string type.
ToStringMap casts an interface to a map[string]interface{} type.
ToStringMapBool casts an interface to a map[string]bool type.
ToStringMapBoolE casts an interface to a map[string]bool type.
ToStringMapE casts an interface to a map[string]interface{} type.
ToStringMapInt casts an interface to a map[string]int type.
ToStringMapInt64 casts an interface to a map[string]int64 type.
ToStringMapInt64E casts an interface to a map[string]int64{} type.
ToStringMapIntE casts an interface to a map[string]int{} type.
ToStringMapString casts an interface to a map[string]string type.
ToStringMapStringE casts an interface to a map[string]string type.
ToStringMapStringSlice casts an interface to a map[string][]string type.
ToStringMapStringSliceE casts an interface to a map[string][]string type.
ToStringSlice casts an interface to a []string type.
ToStringSliceE casts an interface to a []string type.
ToTime casts an interface to a time.Time type.
ToTimeE casts an interface to a time.Time type.
Touch touch().
ToUint casts an interface to a uint type.
ToUint16 casts an interface to a uint16 type.
ToUint16E casts an interface to a uint16 type.
ToUint32 casts an interface to a uint32 type.
ToUint32E casts an interface to a uint32 type.
ToUint64 casts an interface to a uint64 type.
ToUint64E casts an interface to a uint64 type.
ToUint8 casts an interface to a uint8 type.
ToUint8E casts an interface to a uint type.
ToUintE casts an interface to a uint type.
No description provided by the author
Trim trim().
UcFirst UcFirst().
UcWords UcWords().
No description provided by the author
Uniqid uniqid().
No description provided by the author
Unlink unlink().
Unpack unpack().
URLDecode urldecode().
URLEncode urlencode().
Usleep usleep().
VerifyEmail 验证邮箱.
VerifyIPv4 判断是否是否 ipv4 地址.
VerifyIPv6 判断是否是 ipv6 地址.
VerifyPhone 验证电话号码是否正确.
VersionCompare version_compare() The possible operators are: <, lt, <=, le, >, gt, >=, ge, ==, =, eq, !=, <>, ne respectively.
Wordwrap wordwrap().
ZhCharToFirstPinyin 将中文转换成小写字母.
ZhCharToPinyin 将中文转换成小写字母.
ZipOpen zip_open().

# Structs

URL wrap url.URL.