PadLeft 和 PadRight 例子

Private Sub btnPadLeft_And_PadRight_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPadLeft_And_PadRight.Click
    Dim str As String = "coperator"
    Dim strPadLeft As String = ""
    Dim strPadRight As String = ""
    strPadLeft = str.PadLeft(10, "@")
    strPadRight = str.PadRight(10, "@")
    MsgBox(strPadLeft & vbCrLf & strPadRight)
End Sub

你可能感兴趣的:(PadLeft 和 PadRight 例子)