Top "Strcmp" questions

strcmp is a string compare function that is available in languages such as C, C++, PHP, Python and MATLAB.

Is there any safe strcmp?

I made a function like this: bool IsSameString(char* p1, char* p2) { return 0 == strcmp(p1, p2); } The problem is that …

c++ c strcmp
strcmp cannot convert ‘std::string {aka std::basic_string<char>}’ to ‘const char*

Apologies in advance for the elementary nature of the question. I am trying to use the strcmp function to test …

c++ strcmp
Implementation of strcmp

I tried to implement strcmp: int strCmp(char string1[], char string2[]) { int i = 0, flag = 0; while (flag == 0) { if (string1[i] > …

c c-strings strcmp
Option Strict On disallows late binding

Can someone help me fix this error? Option Strict On disallows late binding Here's the code that's causing the error: …

vb.net visual-studio-2010 strcmp
strcmp not working

I know this may be a totally newbie question (I haven't touched C in a long while), but can someone …

c strcmp
strcmp for empty string

I was reviewing some code and I saw someone do a if (0 == strcmp(foo,"")) I am curious because I think …

c strcmp
Efficient string sorting algorithm

Sorting strings by comparisons (e.g. standard QuickSort + strcmp-like function) may be a bit slow, especially for long strings sharing …

string algorithm sorting quicksort strcmp
strcmp on a line read with fgets

I'm trying to compare two strings. One stored in a file, the other retrieved from the user (stdin). Here is …

c string input fgets strcmp
strcmp behaviour

When I run the following code: #include <stdio.h> int main(int argc, char *argv[]) { int p = 0; p = …

c string strcmp
Optimized strcmp implementation

This function was found here. It's an implementation of strcmp: int strcmp(const char* s1, const char* s2) { while (*s1 &…

c string-comparison strcmp