开发者

Check if string starts with tab

开发者 https://www.devze.com 2023-02-20 20:50 出处:网络
How do I check if a string st开发者_StackOverflow社区arts with a tab in Groovy?This are some ways to do it....there are more like regex

How do I check if a string st开发者_StackOverflow社区arts with a tab in Groovy?


This are some ways to do it....there are more like regex

​def s = "\t"​​

assert s[0] == "\t"
assert s.startsWith("\t")
0

精彩评论

暂无评论...
验证码 换一张
取 消