function arabicWordEndCheck(contextParams) {
    var nextChar = contextParams.get(1);
    return (
        // ? last arabic char
        (nextChar === null) ||
        // ? next char is not arabic
        (!isArabicChar(nextChar))
    );
}
Apply single substitution format 2
@param {Array} substitutions substitutions
@param {any} tokens a list of tokens
@param {number} index token index