How to use {capitalize-match}?

I didn't get it at all and the article Text Blaze | Capitalize doesn't give any clue.
Tried to find it on Youtube but didn't find the answer
Could someone with expertise clarify it?

The main idea behind it is following
I want to have a shortcut to create a properly formatted title out of the clipboard
For instance,
I have this in the clipboard: "Here is the example of the title"
I want this output: "Here Is the Example of the Title", i.e. all other words are capitalized unless they are conjunctions (and, or, but, nor, yet, so, for), articles (a, an, the), or prepositions (in, to, of, at, by, up, for, off, on).

Is it possible with Text Blaze?

Hi @Online_Grands, welcome to the forum.

Here's how you can do that:

{words=split({clipboard}, " ")}{repeat: for word in words}{=proper(word)} {endrepeat}

Just copy the text you want into your clipboard and insert the snippet above. That will do the trick.

Thank you, but you can do it with this command
{=proper({clipboard})}

Actually, you gave me an idea of how to do it with a little bit of extra code:

{words=split({clipboard}, " ")}{repeat: for word in words}{if: contains("and, or, but, nor, yet, so, for, a, an, the, in, to, of, at, by, up, for, off, on",{=lower(word)})}{=lower(word)}{else}{=proper(word)}{endif} {endrepeat}

So, thank you for the hint!

1 Like

BTW, @Cedric_Debono_Blaze how do you put such a preview of a snippet in a reply? Can't repeat it :slight_smile:

Ah, you're right, sorry about that :slight_smile:

Here's how to insert a dynamic snippet:

ezgif.com-gif-maker (2)

1 Like

Thank you!

This is awesome. Do you mind adding it to the "nifty little snippet competition"?

Of course, added :slight_smile: