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

  • SEARCH
  • Home
  • 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 8483247
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T20:02:42+00:00 2026-06-10T20:02:42+00:00

I know that the compare method will return an integer value denoting something like

  • 0

I know that the compare method will return an integer value denoting something like the difference between the two strings (or 0 if matched). My question is, in the case the a mismatch is found, does it stop comparing at the mismatch or it finishes until it was specified?

Does it depends on the compiler or is it standard? I am currently using gcc 4.1.2

  • 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-06-10T20:02:43+00:00Added an answer on June 10, 2026 at 8:02 pm

    Well, the standard doesn’t care, but the result of the compare — the standard only cares about that — is entirely dependent on the first non-matching character. So comparing the others would be rather pointless for any implemention, except possibly a few more characters if it’s easier to handle wrt to caches or word sizes of the platform.

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

Sidebar

Related Questions

I'm trying to write a method in C# that will return the difference between
I'm learning JUnit, I know that assertEquals() invokes the equals() method to compare objects...
I know that I can use cmp, diff, etc to compare two files, but
Okay, here's my short question: I know that === and !== operators will compare
What is the difference between == and Equals() with example? I know that ==
Consider two references of type Integer that call the static factory method valueOf as
I am creating a generic operator method that can dynamically compare two objects of
I know that on MacOSX / PosiX systems, there is atomic-compare-and-swap for C/C++ code
Does anyone know of a tool that can be used to compare (relatively complex)
I know that this line of code will make the cell text-wrap: $objPHPExcel->getActiveSheet()->getStyle('D1')->getAlignment()->setWrapText(true); 'D1'

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.