bai'i VUhU experimental cmavo

mekso string operator (ternary): find-and-replace; in string/text/word/sequence X1 formally replace X2 (ordered tuple of terms to be replaced) with X3 (ordered tuple of terms to be respectively substituted)

X2 and X3 are ordered tuples of substrings/letters/characters/letterals/digits/numerals. The ith term in tuple X2 is replaced with the ith term in tuple X3; the replacements are executed simultaneously (thus, no overlap/contradiction can be allowed to arise in the substitution- in particular, in X2) - alternatively, if there is overlap/conflict in/between the terms of X2, the replacements are performed in order of presentation (the ith term in X2 is replaced by the ith term in X3, and then the (i+1)th term in X2 is replaced with the (i+1)th term in X3, starting with the 1st term in each). X2 and X3 must have the same length/number of terms - alternatively, X3 cannot be longer/have more terms than X2; in this situation, the ith term of X2 is replaced with the ith term of X3 until and including when the last term of X3 is reached, after which point the remaining terms in X2 are not replaced at all. Use a permutation acting on X2 as the argument for X3 in order to rearrange the substrings of X1; if the alphabet is ordered, then operators can be applied to the letters in order to rotate through the alphabet. In particular, if X1 is a binary string (a word over an alphabet of two letters) and X2 is the 2-tuple of the letters of that binary alphabet (length-1 substrings), then without specification of X3, this operator defaults to bitwise binary negation (bit conjugation) wherein each letter in X1 is replaced by the unique other letter in the binary alphabet (otherwise, the replacement would be the identity/trivial replacement or just a formal substitution letter-by-letter which does not really change the nature of the word). X1 and each entry in X2 and X3 should be quoted, match a necessary type (such as being a character), or be abstracted a level by symbolics. In general, the replacement is formal and the strings in X3 need not be over the same alphabet as the one over which X1 is written. This operator is useful for combinatorial lines and for expanding digits (such as, in a binary string, replacing each occurrence of "0" with "01" and each occurrence of "1" with "10"; note that the replacement is instantaneous and simultaneous for all terms of X2 and every occurrence of such terms in X1, thus this substitution is perfectly acceptable).