开发者社区 问答 正文

String类的常用方法(字符串查找)有哪些呢?

已解决

String类的常用方法(字符串查找)有哪些呢?

展开
收起
游客yr35xuqu7cwza 2022-04-02 16:49:03 537 分享
分享
版权
举报
1 条回答
写回答
取消 提交回答
  • 推荐回答

    1.public Boolean contains(Strings)

    2.public int indexOf(String str)

    3.public int indexOf(String str,int fromIndex)

    4.public int lastindexOf(String str)

    5.public int lastIndexOf(String str,int fromIndex)

    6.public boolean startsWith(String prefix)

    7.public boolean startsWith(String prefix, int toffset)

    8.public boolean endsWith(String suffix)。

    2022-04-03 10:09:10 举报
    赞同 评论

    评论

    全部评论 (0)

    登录后可评论
AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等