michaelaltmann / get-your-refund

1 stars 5 forks source link

Create sms-counter.user.js #9

Closed plocket closed 3 years ago

plocket commented 3 years ago

Allow user to see the number of sms messages the text they've entered will send.

Original is here: https://github.com/plocket/sms-counter

plocket commented 3 years ago

There is something amiss with your math.

  1. Nice eye
  2. That actually brings up a discussion topic. Other than some specific complications, 158 is the number that splits messages, but I think some services try to keep whole words as one piece. Should we be cautious and create a margin, or should we be exact?
plocket commented 3 years ago

I'm not sure the statement for 160 quite makes sense that way either now that I think about it. At 160 characters you have one full message. One more character will turn it into two messages. Other options:

Option 1

1 msgs (2 chars left) Num chars 159

1 msgs (1 chars left) Num chars 160

2 msgs (134 chars left) Num chars 161


Option 2

1 msgs (1 chars left) Num chars 159

1 msgs (0 chars left) Num chars 160

2 msgs (133 chars left) Num chars 161


Option 2 makes the most sense to me [at the moment].

plocket commented 3 years ago

I gave it a shot. Let me know what you think.