startsWith什么意思

弥漫了等候 1个月前 已收到1个回答 举报

我也难过 3星

共回答了370个问题采纳率:93.8% 评论

startsWith是String类中的一个方法,用来检测某字符串是否以另一个字符串开始,返回值为boolean类型如:String cmd = "abcd";String prefix = "abc";Boolean b = cmd.startsWith(prefix);则b就为true,如果prefix的值为“”空字符串,(即cmd.startsWith(""),)则也是返回true。

16小时前

19
可能相似的问题

猜你喜欢的问题

热门问题推荐

Copyright © 2024 微短问答 All rights reserved. 粤ICP备2021119249号 站务邮箱 service@wdace.com