Added option to force encoding on message splitter
This commit is contained in:
+3
-2
@@ -603,12 +603,13 @@ function bitCount(msg, encoding) {
|
||||
* Split a message into multiple messages
|
||||
*
|
||||
* @param str msg
|
||||
* @param str encoding - Force encoding ASCII or UCS2 (OPTIONAL)
|
||||
* @return array of buffers
|
||||
*/
|
||||
function splitMsg(msg) {
|
||||
function splitMsg(msg, encoding) {
|
||||
var msgPart = '',
|
||||
msgs = [],
|
||||
encoding = defs.encodings.detect(msg),
|
||||
encoding = encoding || defs.encodings.detect(msg),
|
||||
totBitCount = bitCount(msg, encoding),
|
||||
udh,
|
||||
i,
|
||||
|
||||
Reference in New Issue
Block a user