message_segment_calculator 0.0.3 copy "message_segment_calculator: ^0.0.3" to clipboard
message_segment_calculator: ^0.0.3 copied to clipboard

Efficiently calculate SMS segments for messages with support for GSM and UCS-2 encoding. Ideal for apps that require precise SMS length and cost management.

example/example.dart

import '../lib/src/sms_segment_calculator.dart';

void main() {
  String message = '''Hi Roberta 
Its Peter with Krown Funding touching base
Its not too late to get funded b4 the weekend 🤑
Reply Yes to Get Funded Today or DND to optout''';
  final segments = SMSegmentCalculator.calculateSegments(message);
  print(
      'Total segments: ${segments.totalSegments}'); // Output should be correct based on encoding
  print('Total characters count: ${segments.characterCount}');
}
8
likes
0
points
159
downloads

Publisher

unverified uploader

Weekly Downloads

Efficiently calculate SMS segments for messages with support for GSM and UCS-2 encoding. Ideal for apps that require precise SMS length and cost management.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on message_segment_calculator