Skip to content
Advertisement

String Arraylist get the item starting with this string

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

JavaScript

Now I have a string String sweet="c"; Now what OI want is to filter that Arraylist based on my string(sweet) so the items of the MyStrings will be only Cat and Can

EDIT I am really sorry for the trouble I got you but my main problem is that sweet is a editable Ive tried using this code

JavaScript

using this declaration

JavaScript

Sorry for my wrong question.. Foolish me

Advertisement

Answer

JavaScript

The list MySortStrings contains the Cat & Can

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement