.NET 电话号码解析库
有谁知道 .NET 的通用电话号码解析库吗?理想情况下,我正在寻找类似于 Ruby Phone 库的东西。
Does anyone know of a generic phone number parsing library for .NET? Ideally I'm looking for something similiar to the Ruby Phone library.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
CodePlex 上有 Google libphonenumber 的替代端口。它看起来不像另一个那么受欢迎,但看起来它是基于该库的较新版本,并且看起来仍在开发中。
There's an alternative port of Google's libphonenumber on CodePlex. It doesn't seem as popular as the other one, but it looks like it's based on a newer version of the library and it looks like it's still being developed.
您是否考虑过将您引用的 Ruby 库移植到在 .NET DLR 上运行的 IronRuby?我以前没有使用过 IronRuby,但由于它是一种 .NET 语言,因此您可以简单地移植代码并公开强类型接口,以便在 VB.NET 或 C# 中更好地使用。
Have you considered taking the Ruby library you referenced and porting it to IronRuby, which runs on the .NET DLR? I haven't used IronRuby before, but since it's a .NET language, you may be able to simply port the code over and expose and strongly-typed interface that can be better consumed in VB.NET or C#.
您可以从高级电话号码类型实现开始href="http://www.codeproject.com" rel="nofollow noreferrer">CodeProject。乍一看,它似乎缺少您引用的 Ruby 库中找到的国际化部分。
当然,您始终可以从现有库开始并向其添加内容,并且根据原始库的许可证,您甚至可以选择发布自己的库,其中包含您所需要的内容。
You could start with Advanced Phone Number Type Implementation on CodeProject. At first glance, it seems that it may be lacking the internationalization pieces found in the Ruby library you referenced.
Of course, you could always start with an existing library and add on to it, and depending on the license of the original library, you might even choose to release your own that has exactly what you need.
我建议使用 Google 的 libphonenumber,这是 有关如何使用 libphonenumber 的博客文章。
解析数字就像安装 NuGet 包 一样简单,然后执行以下操作:
I'd recommend going with libphonenumber from Google, here's a blog post on how to use libphonenumber.
Parsing numbers is as easy as installing the NuGet package and then doing this:
我会选择 Google libphonenumber 库的 C# 端口。
https://bitbucket.org/pmezard/libphonenumber-csharp/wiki/Home
I would go with the C# port of the Google libphonenumber library.
https://bitbucket.org/pmezard/libphonenumber-csharp/wiki/Home