Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Remove vowels from string VB.net

Posted on 2010-09-13
3
Medium Priority
?
1,309 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

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

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

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
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…

609 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