String Arraylist get the item starting with this string

后端 未结 5 1698
长情又很酷
长情又很酷 2021-02-09 15:35

I have a array list in which I bind the data This is a example

MyStrings =new ArrayList();
MyStrings.add(\"Dog\");
MyStrings.add(\"Cat\");
MyString         


        
5条回答
  •  执笔经年
    2021-02-09 16:19

    Use str.startsWith(String, int index)

    Index will tell you from which index in the str it should start comparing

提交回复
热议问题