Xpl*_*ive -2 java string substring
我想检查一个以http://或不是开头的字符串.如果没有循环我怎么能这样做?提前致谢.
使用public boolean startsWith(String prefix)的字符串 API
例如: boolean isStartsWith = YOUR_STRING.startsWith("http://");
String tst = "http://web.com";
System.out.print(tst.startsWith("http://")); //prints true
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2663 次 |
| 最近记录: |