printing selected objects from an array

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fireyowie
    New Member
    • Apr 2007
    • 1

    printing selected objects from an array

    i am sure i am missing something very simple!
    i have split my array into a string of elements
    i have managed to print each string
    however,
    i need to only print out strings that contain a certain value (eg true), how do i identify the strings to be printed?
    paul
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by fireyowie
    i am sure i am missing something very simple!
    i have split my array into a string of elements
    i have managed to print each string
    however,
    i need to only print out strings that contain a certain value (eg true), how do i identify the strings to be printed?
    paul
    Have a look at the API documents for the String.contains (CharSequence pat)
    method; a String is a CharSequence, so no need to worry.

    kind regards,

    Jos

    Comment

    Working...