Solved

Remove vowels from string VB.net

Posted on 2010-09-13
3
1,220 Views
Last Modified: 2012-05-10
Hi all,

Can someone please provide a function that removes vowels from string.

thanks
Zeus
0
Comment
Question by:Zeus2009
  • 2
3 Comments
 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 250 total points
ID: 33663126
Seriously?...   =\

    Private Function RemoveVowels(ByVal strIn As String) As String
        For Each vowel As String In "aeiouAEIOU"
            strIn = strIn.Replace(vowel, "")
        Next
        Return strIn
    End Function
0
 

Author Closing Comment

by:Zeus2009
ID: 33663696
yep lol im trying to prove a point in a meeting, thanks idel mind.
0
 
LVL 85

Expert Comment

by:Mike Tomlinson
ID: 33663926
If you have VB.Net 2008 or above then it could be written as an "Extension" method which would make it look like this instead:

    yourStringVariableHere.RemoveVowels()

See: http://msdn.microsoft.com/en-us/library/bb384936.aspx
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A short article about a problem I had getting the GPS LocationListener working.
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now