mergeFragments static method
Merges next into fragment (concatenates the text, then next must be
removed from the container by the caller).
Implementation
static void mergeFragments(Fragment fragment, Fragment next) {
fragment.text += next.text;
}