question: private String excludeDestinationStatement ( String text ) { int idx = - 1 ; if ( ( idx = text . indexOf ( "Destination will be" ) ) != - 1 ) { text = text . substring ( 0 , idx ) ; } return text ; }
target:  Parses the specified String to return the portion not containing the destination statement. This is needed so that the main text which when parsed, indicates the direction icon that will be used; will be the only determiner of the associated directions icon. The destination text has other directions which will confuse the parsing which determines the icon. (i.e. The destination will be on the right).