I’ve looked in the forum and on atbref, but can’t find anything — but I may not have used the right search terms. Is there a function which will build a string from another string repeated X times?
E.g. something which would work like this:
$MyString = repeat("#", X)
… which would result in
The nearest I can get to is to use
$MyString = substr("#######",0,4)
which works, but it feels a bit clunky, and it means I have to guess the maximum number of characters in the ‘dummy’ string.
I want to use it in Export code, and the
# probably gives the game away that I want to create the right level of markdown headers for descendants of the selected notes. I want to make sure that whichever level I choose to export, the hierarchy starts with #, children are ## and so on.
The following works, but I wondered if there was a simpler way to build the header.
(Obviously, if there’s an easier approach to build the hierarchy, it would be good to know that too…)