refactored lastIndexOf
This commit is contained in:
parent
5704196700
commit
2391ff613c
1 changed files with 3 additions and 2 deletions
|
@ -60,8 +60,9 @@ public class TransportStopRouteAdapter extends ArrayAdapter<TransportStopRoute>
|
|||
|
||||
private String getAdjustedRouteRef(String ref) {
|
||||
if (ref != null) {
|
||||
if (ref.contains(":")) {
|
||||
ref = ref.substring(0, ref.lastIndexOf(':'));
|
||||
int charPos=ref.lastIndexOf(':');
|
||||
if (charPos!=-1) {
|
||||
ref = ref.substring(0, charPos);
|
||||
}
|
||||
if (ref.length() > 4) {
|
||||
ref = ref.substring(0, 4);
|
||||
|
|
Loading…
Reference in a new issue