Java tutorial
//package com.java2s; //License from project: Apache License import android.support.annotation.NonNull; public class Main { public static final char T9_KEYS_DIVIDER = ';'; private static void insertT9Key(@NonNull StringBuilder t9KeyBuilder, @NonNull String t9Str) { if (t9Str.length() == 0) return; int index = -1; while ((index = t9KeyBuilder.indexOf(String.valueOf(T9_KEYS_DIVIDER), index + 1)) >= 0) { t9KeyBuilder.insert(index, t9Str); index += t9Str.length(); } } }