Solved

Remove vowels from string VB.net

Posted on 2010-09-13
3
1,198 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
Comment Utility
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
Comment Utility
yep lol im trying to prove a point in a meeting, thanks idel mind.
0
 
LVL 85

Expert Comment

by:Mike Tomlinson
Comment Utility
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
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 …

763 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

12 Experts available now in Live!

Get 1:1 Help Now