阅读背景:

使用gsub - Ruby在字符之间插入空格

来源:互联网 

Let's say I had a string "I have 36 dogs in 54 of my houses in 24 countries". Is it possible by using only gsub to add a " " between each digit so that the string becomes "I have 3 6 dogs in 5 4 of my houses in 2 4 countries"?Let's say I had a string "I have 36 dogs in 54




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: