length, bytes, unicode, entropy, character frequency
curl -sX POST 'https://api.whittly.dev/v1/string/inspect' \
-H 'Authorization: Bearer $WHITTLY_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"input":"hello, world!"}'
const res = await fetch('https://api.whittly.dev/v1/string/inspect', {
method: 'POST',
headers: {
'Authorization': 'Bearer ' + apiKey,
'Content-Type': 'application/json',
},
body: JSON.stringify({ input: "hello, world!" }),
});
const data = await res.json();
const { data } = await axios.post(
'https://api.whittly.dev/v1/string/inspect',
{ input: "hello, world!" },
{ headers: { Authorization: 'Bearer ' + apiKey } }
);
Text is more complex than it appears — a string's byte length differs from its character count when it contains multi-byte Unicode characters (emoji, CJK characters, accented letters). Shannon entropy measures the information density of the string and can detect patterns or randomness.