Thread: String.Compare question

  1. #1
    Android geek@02's Avatar
    Join Date
    Mar 2004
    Kurunegala Colony, Sri Lanka, Sri Lanka

    String.Compare question


    i = String.Compare(strActor, 0, comboBoxFilterActors.Text, 0, comboBoxFilterActors.Text.Length, true);
    strActor contains a bunch of actor names (e.g. "Franka Potente, Tom Tykwer, Moritz Bleibtreu,"). comboBoxFilterActors.Text contains a single actor name to search through strActor. Now because i've input comboBoxFilterActors.Text.Length as the 6th parameter, the compare method searches only through comboBoxFilterActors.Text variable length in strActor. But i wanna search through whole strActor. How to do that?

    Thanks a lot.
    My amature IT Blog:
    My Flash games:

    (and, sorry for my amateur English)

  2. #2
    Gawking at stupidity
    Join Date
    Jul 2004
    Oregon, USA
    I think you should be using String.Contains() instead.
    If you understand what you're doing, you're not learning anything.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. string compare
    By ingeniousreader in forum C Programming
    Replies: 7
    Last Post: 03-02-2012, 12:43 PM
  2. String Compare
    By shruthi in forum C Programming
    Replies: 2
    Last Post: 02-09-2012, 09:27 AM
  3. Unable to compare string with 'getter' returned string.
    By Swerve in forum C++ Programming
    Replies: 2
    Last Post: 10-30-2009, 05:56 PM
  4. Compare 2 String
    By nitediver in forum C Programming
    Replies: 2
    Last Post: 10-06-2009, 07:48 AM
  5. string compare
    By IceBall in forum C Programming
    Replies: 4
    Last Post: 10-12-2003, 05:26 PM