摘要:
在SHELL编程中,经常要处理一些字符串变量。比如,计算长度啊、截取子串啊、字符替换啊等等,常常要用到awk、expr、sed、tr等命令。下面给大家介绍个简单的字符串处理方法,用不着嵌套复杂的子命令。 阅读全文
摘要:
函数:string || string
说明:String concatenation 字符串连接操作
例子:select 'Post' || 'greSQL'; = PostgreSQL
函数:string || non-string or non-string || string
说明:String concatenation with one non-string input 字符串与非字符串类型进行连接操作
例子:select 'Value: ' || 42; = Value: 42
函数:bit_length(string)
说明:Number of bits in string 计算字符串的位数
例子:select bit_length('pmars') = 40 阅读全文