编程语言

img iwebsms

检查一个字符串是不是常用域名

发表于2004/9/28 19:35:00  868人阅读

'检查一个字符串是不是常用域名

Function CheckDomain(ByVal Domain As String) As Boolean

    Dim vDomain() As String = Domain.Split(".") : Dim i As Integer

    Dim vLastDomain As String() = "com,net,org,gov,cn,info,biz,tv,cc,name".Split(",")

    If vDomain.Length > 1 Then

        For i = 0 To vLastDomain.Length - 1

            If vDomain(vDomain.Length - 1) = vLastDomain(i) Then Return True

        Next

    End If

End Function

阅读全文
0 0

相关文章推荐

img
取 消
img