StringLiteral API clarification?

Hi guys,

I’m working on extending format string validation, and I was going through the FormatStringLiteral → StringLiteral → StringRef

and I’m just wondering what the following functions mean?

strLen()

getLengthInBytes()

getLength()

size()

What do these functions return?

How do I get the size of a string in CodeUnits or CodePoints?

You would probably have to query some unicode API to get answers in code points. LLVM strings are always assumed to be in UTF-8, so the results of these functions are probably always bytes.