Suppress first name with initials only

pull/197/head
M66B 5 years ago
parent 22de68038c
commit 0b63c18846

@ -94,6 +94,20 @@ public class EntityAnswer implements Serializable {
}
}
if (fullName != null && !fullName.equals(first)) {
String[] parts = first.split("\\.");
if (parts != null && parts.length > 0) {
boolean initials = true;
for (String part : parts)
if (part.trim().length() > 1) {
initials = false;
break;
}
if (initials)
first = null;
}
}
text = text.replace("$name$", fullName == null ? "" : fullName);
text = text.replace("$firstname$", first == null ? "" : first);
text = text.replace("$lastname$", last == null ? "" : last);

Loading…
Cancel
Save