Command/widthofstring

From ConTeXt wiki

The \widthofstring command returns the dimensions of the given text.

For example:

width=\widthofstring{COW}