资讯

精准传达 • 有效沟通

从品牌网站建设到网络营销策划,从策略到执行的一站式服务

Golang实现PHP常用函数有哪些-创新互联

小编给大家分享一下Golang实现PHP常用函数有哪些,希望大家阅读完这篇文章之后都有所收获,下面让我们一起去探讨吧!

创新互联是一家专注于成都网站制作、成都做网站、外贸营销网站建设与策划设计,尤溪网站建设哪家好?创新互联做网站,专注于网站建设10多年,网设计领域的专业建站公司;建站业务涵盖:尤溪等地区。尤溪做网站价格咨询:18980820575

Golang实现PHP常用函数

# go-to-php(https://github.com/Echo-Mr-Pengw/go-to-php)

用Golang封装PHP常用的函数,为了区分PHP与Go中的函数,go-to-php封装的函数,都是在对应的PHP函数的前面加上大写的PPallord函数除外。代码地址点击github

安装

1.字符串相关包

go get -u github.com/Echo-Mr-Pengw/go-to-php/str

2.数组相关包
开发中
…….

字符串相关函数

go-to-php封装函数对应的PHP函数
Pimplode(glue string ,pieces interface{})  stringimplode
Pjoin(glue string ,pieces interface{})  stringimplode的别名,同Pimplode
Pexplode(delimiter ,str string ,limit int) []stringexplode
Pstrlen(str string) intstrlen
Pmb_strlen(str string) intmb_strlen
Plcfirst(str string) stringlcfirst
Pucfirst(str string) stringucfirst
Pstrtoupper(str string) stringstrtoupper
Pstrtolower(str string) stringstrtolower
Pucword(str string) stringucword
Ptrim(str ,character_mask string) stringtrim
Pltrim(str ,character_mask string) stringltrim
Prtrim(str ,character_mask string) stringrtrim
Pchop(str ,character_mask string) stringrtrim的别名,同Prtrim
Pmd5(str string) stringmd5
Psha1(str string) stringsha1
Pord(str string) intord
Pallord(str string) interface{}转化全部字符,ord的升级版
Pchr(ascii int32) stringchr
Pecho(a ...interface{})echo
Pvar_dump(a ...interface{})var_dump
Pprint(a interface{})print
Pstr_repeat(input string ,multiplier int) stringstr_repeat


看完了这篇文章,相信你对“Golang实现PHP常用函数有哪些”有了一定的了解,如果想了解更多相关知识,欢迎关注创新互联行业资讯频道,感谢各位的阅读!


网页名称:Golang实现PHP常用函数有哪些-创新互联
地址分享:http://cdkjz.cn/article/dhjeci.html
多年建站经验

多一份参考,总有益处

联系快上网,免费获得专属《策划方案》及报价

咨询相关问题或预约面谈,可以通过以下方式与我们联系

大客户专线   成都:13518219792   座机:028-86922220