Re: case sensitivity in strings...

From: Mike B (mrcics2000-news-nomail_at_nomail.yahoo.com)
Date: 11/28/04


Date: Sun, 28 Nov 2004 16:40:01 -0600

Frances Del Rio <fdr58@yahoo.com> wrote:
> this seems like somthing so simple, but I can't figure it out... I
> have a little app that consists basically of a string being displayed
> and app tests whether or not user typed in a substring of that
> string... (complete code at www.francesdelrio.com/hamlet.html)
>
> but: I would like this to be non-case-sensitive.. the way it is now
> if user types 'hamlet' instead of 'Hamlet' it returns that that
> substring is not found in the string... how do I say:
> if(Str.indexOf(useript) REGARDLESS OF CASE...... like you can do
> with CompareTo() method... I don't see the possibility of doing this
> w/indexOf in API.. thanks for any help.. Frances

Translate both strings to either upper- or lower-case before you search in
the string.

-- 
Mike B 


Relevant Pages

  • Re: June 2005 EAL Question
    ... parameter to a string. ... > public class MyEventLogInstaller: Installer ... You have a web app, ... >>> at Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean ...
    (microsoft.public.dotnet.general)
  • Re: Running other applications
    ... associated with a file type (extension). ... file and calling FindExecutable: ... ByVal lpDirectory As String, ByVal lpResult As String) As Long ... > The app is a program called Data Junction. ...
    (microsoft.public.vb.general.discussion)
  • Re: Cant register Windows Scripting Host with Windows 7
    ... My app has been in use since 1999 and is designed to work on Win 95 onwards hence the installer has always include WSH. ... One functions I have used it for in the program is to find the location of the users special folders eg. documents folder and then to delete a subfolder. ... Public Function GetSpecialFolderAs String ... Dim lNullPos As Long ...
    (microsoft.public.vb.general.discussion)
  • RE: SoapHttpClientProtocol request canceled
    ... the VB app on Citrix works fine with .NET components when only ... .NET1.1 is installed and the app uses .NET1.1. ... > The VB.NET exe and the VB6 exe both use VB.NET dll to sent request/response ... >> inputHeaderer, String messageControlPayload, string inputMessage) ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: Multi language application
    ... the block below implies that you created your app as "Unicode app". ... Whether you choose UTF8 or UTF16 is really up to you but by default in a "Unicode app", you're likely to write less code with UTF16 strings. ... You can use::MultiByteToWideChar Win32 API to convert from UTF-8 to UTF-16, and pass the UTF-16 string to Windows controls. ...
    (microsoft.public.vc.mfc)