A library to Get SMS parts length for given string, it takes into account the charset of message body detecting between GSM7, Unicoded message bodies and giving SMS parts accordingly.
TL;DR
More Info on SMS lengths here https://www.world-text.com/docs/sms-length.php
Examples
Simple GSM7 Char body
smsParts := smslength.GetSMSParts("testing")
fmt.Println(smsParts)
Output
1
Unicode Char body
smsParts := smslength.GetSMSParts("ăZʍ𦞺9r)(Δݷ֣퐘Řaas꓄悗償%O夒Д--2䴛槫춡<ꣻئɅ뢉՛,خssϞ:ʣጳ(蝹ӂ交柪?٦쳕磏͒qtԜ҈쏒W㗁ԂD欕D"憬ˆ!Ӹⵗɝ?Ӯ]܂ҥ4읊Ζ}豱շښܾ纒藯b䬢ܫtؕjxńֺ<𝚝ˬîґNڧh}Ǜ贈#<ᜏނ'b]˽刺Ѐ𨦨2ͫ֞쪧")
fmt.Println(smsParts)
Output
3