create function fun_getPY(@str nvarchar(4000)) returns nvarchar(4000) as begin declare @word nchar(1),@PY nvarchar(4000) set @PY=''while len(@str)>0 begin set @word=left(@str,1) --如果非汉字字符,返回原字符 set @PY=@PY+(case when unicode(@word) between 19968 and
#英文字串首字母改为大写 st = "string" St = st[0].upper() + st[1:] 2016-10-22 后来了解到 python 内部有相关实现,感觉 python 好贴心~~~ >>> "hehe he hehe".capitalize() 'Hehe he hehe' >>> "hehe he hehe".title() 'Hehe He Hehe'
ql获取汉字的拼音首字母 if exists (select * from sysobjects where id = object_id(N'[fn_ChineseToSpell]') and xtype in (N'FN', N'IF', N'TF')) www.2cto.com drop function [fn_ChineseToSpell] GO /*创建取拼音首字母函数*/ create function [dbo].[fn_ChineseToSpell](@