¡@

Home 

2014/10/16 ¤W¤È 08:25:39

android Programming Glossary: targetstring.length

Android Bug? : String.substring(5).replace(?œâ€? ?œâ€? // empty string

http://stackoverflow.com/questions/16475317/android-bug-string-substring5-replace-empty-string

replacement.toString The empty target matches at the start and end and between each character. int targetLength targetString.length if targetLength 0 int resultLength count 2 replacementString.length StringBuilder result new StringBuilder resultLength.. replacementString replacement.toString The empty target matches at the start and end and between each character. if targetString.length 0 The result contains the original 'count' characters a copy of the replacement string before every one of those characters.. Insert the replacement... result.append replacementString And skip over the match... searchStart matchStart targetString.length while matchStart string.indexOf targetString searchStart 1 Copy any trailing chars... result.append value searchStart count..