Sanitize Phone Number String - Android java.lang

Android examples for java.lang:String Parse

Description

Sanitize Phone Number String

Demo Code


//package com.java2s;

public class Main {
    public static String SanitizePhoneNumber(String phoneNumber) {
        phoneNumber = phoneNumber.replace(" ", "");
        phoneNumber = phoneNumber.replace("-", "");
        phoneNumber = phoneNumber.replace("+", "");

        return phoneNumber;
    }// www  . j  a v a 2  s .  co  m
}

Related Tutorials