strncat method
Appends up to n characters from the string src to the end of the string dest.
Returns the concatenated string.
Implementation
String strncat(String dest, String src, int n) {
if (src.length >= n) {
return dest + src.substring(0, n);
} else {
return dest + src;
}
}