public static String formatUuid(@NonNull final String uuidHex) {
        if (isUuidPattern(uuidHex)) {
            return new StringBuffer(uuidHex)
                    .insert(8, "-")
                    .insert(13, "-")
                    .insert(18, "-")
                    .insert(23, "-")
                    .toString()
                    .toUpperCase(Locale.US);
        }
        return uuidHex;
    }
Formats a hex string without dashes to a uuid string

@param uuidHex Hex string
mesh/src/main/java/no/nordicsemi/android/mesh/utils/MeshParserUtils.java