'
' - - - - - - - - - - - - -
' - - - - - - - - - - - - -
' Object Oriented Programming 2008, Class 02, Serving TSINT_2009級_職二技_忠班
' - - - - - - - - - - - - -
' - - - - - - - - - - - - -
' Code Name of this module:
' OOP2008C02.FormatControllerForMobilePhoneNumber
' - - - - - - - - - - - - -
' - - - - - -
' OOP2008C02.FormatControllerForMobilePhoneNumberY2008M05D18 [2008-05-18-PM-04-37-36]
' Version: 1.00.01
' Last Updated: (2008 05 18 PM 04 35 56)
' - - - - - - - - - - - - -
' - - - - - - - - - - - - -
Public Class FormatControllerForMobilePhoneNumberY2008M05D18
Public Function GetFormattedMobilePhoneNumber(ByVal MobilePhoneNumber As String) As String
' (本段程式之目的) Purpose:
' Explanation
' (本段程式是否已經在被使用中) In use: Yes
' (重要等級) Importance rating: 60%
' (再利用的可能性) Chances of reuse: 40%
' (程式撰寫的進度) Developing: 100% (Mandatory)
' (程式堪用的程度) Workable: 70% (Threshold at 80%)
' (程式的測試程度) Code tested: 80% (max 99%)
' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
' (修改程式的日期) Revision Date: (2008 05 18 PM 04 16 45)
' (修改程式的人員) Revised by: WeiJin Tang (湯偉晉)
' OK
' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Dim T As String
' a number like "0958227243"
T = MobilePhoneNumber
Dim SB As New System.Text.StringBuilder
With SB
' get substring "0958"
.Append(T.Substring(0, 4))
.Append("-")
' get substring "227"
.Append(T.Substring(4, 3))
.Append("-")
' get substring "243"
.Append(T.Substring(7, 3))
End With
Return SB.ToString
End Function ' GetFormattedMobilePhoneNumber
' - - - - - - - - - - - - -
' - - - - - - - - - - - - -
End Class ' FormatControllerForMobilePhoneNumberY2008M05D18
沒有留言:
張貼留言