Strings manipulation Learn programming Visual Basic (


Arrays, Structures and Strings


Strings manipulation


Create a Visual Basic ( program that asks the user for a string and:

- Replace all lowercase A by uppercase A, except if they are preceded with a space
- Display the initials (first letter and those after a space)
- Display odd letters uppercase and even letter lowercase

The program must display all generated strings.


Imports System
Class exercise89
    Private Shared Sub Main(ByVal args As String())
        Console.Write("Tell a string: ")
        Dim Entry As String = Console.ReadLine()
        Dim result As String
        result = Entry.Replace("a", "A")
    End Sub

    Public Shared Function UppercaseFirst(ByVal s As String) As String
        Return Char.ToUpper(s(0)) & s.Substring(1)
    End Function
End Class

Juan A. Ripoll - Systems Tutorials and Programming Courses ©  All rights reserved.  Legal Conditions.