Skip to content

faisalman/phone-identifier-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 

Repository files navigation

PhoneIdentifier.java

Phone number identifier (currently only support Indonesian number format)

Example

import com.faisalman.phoneidentifier.*;

public class Example {
    public static void main(String[] args) {
        System.out.println(Phone.identify("628552345678").provider.name()); // Indosat
        System.out.println(Phone.identify("0812 345 678").provider.name()); // Telkomsel
        System.out.println(Phone.identify("022911223344").provider.name()); // Esia
        System.out.println(Phone.identify("023187654321").area.code);       // 231
        System.out.println(Phone.identify("+62227654321").area.name);       // Bandung
        System.out.println(Phone.identify("021-765-4321").area.name);       // Jakarta
        System.out.println(Phone.identify("(061)7654321").area.name);       // Medan
    }
}

License

MIT License

Copyright © 2013 Faisalman <fyzlman@gmail.com>

About

PhoneIdentifier.java - Indonesian phone number identifier

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages