?
Solved

Remove vowels from string VB.net

Posted on 2010-09-13
3
Medium Priority
?
1,285 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 1000 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 86

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

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

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

If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Make the most of your online learning experience.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Suggested Courses

741 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