定制 jfrk/swedish-phone-formatter 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

jfrk/swedish-phone-formatter

最新稳定版本:v1.1.0

Composer 安装命令:

composer require jfrk/swedish-phone-formatter

包简介

Formatter for Swedish phone numbers

README 文档

README

<?php
use SwedishPhoneFormatter\SwedishPhoneFormatter;

$formatter = new SwedishPhoneFormatter();

$formatter->format('081234567');  // '08-123 45 67'

// Changes the area code separator
$formatter->format('081234567', ' ');  // '08 123 45 67'

// Changes the area code and number separators
$formatter->format('081234567', '-', '');  // '08-1234567'

// Removes +46 country prefix and extension numbers
$formatter->format('+46 (0) 81234567');  // '08-123 45 67'

// Doesn’t try to format foreign numbers
$formatter->format('+1-202-555-0144');  // '+1-202-555-0144'

// Doesnt’t try to format non-formattable strings
$formatter->format('foobar');  // 'foobar'

// Supports number grouping for numbers without area codes
$formatter->format('112');  // '112'
$formatter->format('1177');  // '1177'
$formatter->format('11414');  // '114 14'
$formatter->format('123 456');  // '12 34 56'
$formatter->format('1234567');  // '123 45 67'
$formatter->format('12345678');  // '123 456 78'
?>

统计信息

  • 总下载量: 304
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-12-20