# What is the standard name for the function which inflates a string by duplicating each of its characters?

Given a string $s$ over some alphabet, I'd like to use the proper nomenclature/notation for the operation/function $f$ which inflates $s$ by independently duplicating each of its characters.

For instance: $$f(abc) = aabbcc$$ or, more generally, a second argument could be provided to specify the number of copies: $$f(xy,4) = xxxxyyyy$$

This should be embarassingly standard, so don't hesitate to shoot me in your response! (on the other hand, it is always difficult to search for something you cannot name, but I wouldn't accept such a lame excuse from my students, so...)

• Not sure about a standard name, but in haskell that would be concatMap (replicate 3) (where concatMap is the flipped bind for the list monad). Dec 23 '14 at 22:42
• I know the name for its reverse: squeeze, used in the context of regular expressions :) . However "function that duplicates each character of a string" seems fine (to me). Dec 23 '14 at 23:55
• @YannPonty I know it's a nomenclature question. For me, Haskell's library is the standard reference for the name of such functions. The names are chosen very carefully, and inspired by things like category theory. The very fact that there's no one function doing what you want in Haskell's library indicates to me that the name (if there is one) can't be that standard. Dec 24 '14 at 8:29
• "stutter" seems like a natural name, google "stutter string function" for examples. Dec 26 '14 at 10:18
• This indeed seems to be the right term, and it is mentioned in multiple academic papers, including this '99 STACS review paper by Thomas Rilke. Could you turn your comment into an answer, so I can accept it (and it becomes properly indexed)? Dec 29 '14 at 2:44