Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6781205
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:35:48+00:00 2026-05-26T16:35:48+00:00

I have a function that searches through an array of strings. It works perfectly,

  • 0

I have a function that searches through an array of strings. It works perfectly, except for the fact that its case sensitive. I need it to be case insensitive.

The easiest way would be to make the function convert the array to lowercase, so when the function performs a search through the array, it is able to find it, regardless of its case.

I have tried adding var array_name_tolowercase = array_name.toLowerCase(); within my function so that when the function is called, it can work on all arrays; if needed.

Im sorry I haven’t made myself clear at all, if this is the case, please let me know and I will try my best to re-explain. Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T16:35:49+00:00Added an answer on May 26, 2026 at 4:35 pm

    You will need to convert the elements of the array to lower case, not the Array object itself. I don’t know exactly what happens inside your function, but something like this:

    for(var i = 0; i < arrayName.length; i++) {
        if(arrayName[i].toLowerCase() === "whatever") {
            //Found a match!
        }
    }
    

    Post some more of your code and it will be easier to provide a more precise solution! Here’s an example of the above.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want a function that searches through my array, and returns all the children
I have a Flex application that calls a function which searches a large document
I have a function that takes a struct, and I'm trying to store its
I have a useful little command that searches through all files & subdirectories for
I have written a macro that searches through workbook and applies an autofilter to
So I have function that formats a date to coerce to given enum DateType{CURRENT,
In my Java code I have function that gets file from the client in
I have a function that gives me the following warning: [DCC Warning] filename.pas(6939): W1035
I have a function that gets x(a value) and xs(a list) and removes all
I have a function that takes, amongst others, a parameter declared as int privateCount

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.