Thanks to visit codestin.com
Credit goes to github.com

Skip to content

mgkyawkolwin/PhoneKeyPadInputConverter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PhoneKeyPadInputConverter

Input converter which converts the numerical key inputs from old phone keypad into alphanumeric characters.

What is PhoneKeyPadInputConverter?

PhoneKeyPadInputConverter is a library which accepts input from old keypad phone and convert it into human readable characters and sentences.

Example: User inputs 222 2 22# and converter converts it to the word "CAB".

About the source code

Source code contains two proejct for different converters, BasicConverters and InputConverters. BasicConverters project contain utility/helper style classes which use normal loop/recursive to convert the input. InputConverters is a class library style project with classes such as factory, interpreter and validator. You can import the project and use directly or you can extend it if you need which is not already available.

How do I get started?

Option 1: You can download the entire souce code to build and run yourself from here. GitHub Repository Code

Option 2: Or you can download the latest release from here. Latest Releases

Option 3: You can add nuget package to your project.

dotnet add package InputConverters --version 1.2.0

First, you need to import the project and use this namespace.

using InputConverters.Converter;

Then you can create the converter from the factory and use it.

// first create a sanitizer to do basic sanitization
var sanitizer = KeyPadConverterFactory.CreateSanitizer(input);
// Process() will do some fundamental validation and then convert to intermediate result
var sanitizedInput = sanitizer.Process();
// After you sanitized, then pass it to the factory to create the actual converter
var converter = KeyPadConverterFactory.Create(sanitizedInput);
// This will produces the final converted result.
return converter.Process();

Do you have an issue?

If you have any issues, you may log the issue HERE.

About

Input converter which converts the numerical key inputs from old phone keypad into alphanumeric characters.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages