string - Replacing text in stringbuffer without hardcoding indexes -


i have stringbuffer object contains data "detail is:"

based on result of hashmap(map), populate details below line of looping through map , fetching data.

now want replace text "detail is:" "details are:" if more 1 record fetched.

is way achieve this?

thanks

you can:

  1. get string out of stringbuffer.
  2. reset stringbuffer , write new beginning.
  3. write after replaced prefix buffer.

instead, this:

  1. omit prefix in first place
  2. do simple string-concatenation @ end.

Comments

Popular posts from this blog

Why can rails not find a route created by a helper? -

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -