热门

最新

红包

立Flag

投票

同城

我的

发布
shulinshulinzi
lin·show
5 年前
trueshulinshulinzi

create or replace function full_to_half(text) returns text as
$$
select string_agg(col, '') from
( select
case when ascii(col) >= 65281 and ascii(col) <=65374 then chr(ascii(col)-65248)
when ascii(col) = 12288 then chr(32)
else col
end AS col
from (select regexp_split_to_table($1, '') as col) t
) tt;
$$ language sql strict immutable;

CSDN App 扫码分享
分享
评论
5
打赏
  • 复制链接
  • 举报
下一条动态
立即登录