Skip to content
This repository has been archived by the owner on Jan 8, 2022. It is now read-only.

Latest commit

 

History

History
32 lines (21 loc) · 1.04 KB

readme.md

File metadata and controls

32 lines (21 loc) · 1.04 KB

Helper library to work with SMS / text messages

How can I calculate the number of required SMS parts for a concatenated text message?

var helpers = new SmsHelpers();
var parts = helpers.CountSmsParts(mymessage);

How can I detect encoding required to send a text message?

var helpers = new SmsHelpers();
var parts = helpers.GetEncoding(mymessage);

How can I use the library with dependency injection / IoC?

You only need to register our interface with your DI/IoC provider like this:

public void RegisterDependencies(IServiceCollection services)
{
    services.AddTransient(typeof(ISmsHelpers), typeof(SmsHelpers));
}

How can I normalize new line characters?

var helpers = new SmsHelpers();
var parts = helpers.NormalizeNewLines(mymessage);

How can I split SMS to multiple individual parts with word wrapping?

var helpers = new SmsHelpers();
var splitResult = helpers.SplitMessageWithWordWrap(mymessage);
var parts = splitResult.Parts;
var encoding = splitResult.Encoding;