阅读背景:

检查字符串中字符使用次数的函数

来源:互联网 

I'm writing a function that takes a string as an argument, checks it for a given character (say "B" in this case), and then returns an integer that reflects the number of times that character appeared. I'm aware that this can be done using regex and such, but the tutorial I'm using has so far made no mention of regex. Code time:I'm writing a function that takes a string as a




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

分享到: