estimateSmsBytes
estimateSmsBytes(
text):number
Defined in: packages/messaging/src/sms-bytes.ts:16
Estimates the bytes a text takes as an SMS or LMS, counted the way KMsg
counts them to choose between the two: one byte for each ASCII character
and two for any other, such as Hangul. KMsg sends text over
defaults.sms.autoLmsBytes (90 by default) as LMS.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”number
Example
Section titled “Example”estimateSmsBytes("Hello"); // 5estimateSmsBytes("안녕하세요"); // 10