Compare functions.  
More...
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
Go to the source code of this file.
|  | 
| typedef int32_t(* | CompareFunc) (const void *a, const void *b) | 
|  | 
| typedef bool(* | EqualFunc) (const void *a, const void *b) | 
|  | 
◆ str_compare
Compares two strings. Returns 0 if values are equal, or a positive integer if the first value comes after the second. 
Definition at line 36 of file compare.h.
 
 
◆ CompareFunc
      
        
          | typedef int32_t(* CompareFunc) (const void *a, const void *b) | 
      
 
A function to compare two values. 
Definition at line 30 of file compare.h.
 
 
◆ EqualFunc
      
        
          | typedef bool(* EqualFunc) (const void *a, const void *b) | 
      
 
A function to check if two values are equal. 
Definition at line 33 of file compare.h.
 
 
◆ direct_compare()
      
        
          | int32_t direct_compare | ( | const void * | a, | 
        
          |  |  | const void * | b | 
        
          |  | ) |  |  | 
      
 
- Parameters
- 
  
  
- Returns
- a - b
Compares two pointers. 
Definition at line 51 of file compare.c.
 
 
◆ direct_equal()
      
        
          | bool direct_equal | ( | const void * | a, | 
        
          |  |  | const void * | b | 
        
          |  | ) |  |  | 
      
 
- Parameters
- 
  
  
- Returns
- true if pointers are equal
Tests if two pointers are equal. 
Definition at line 60 of file compare.c.
 
 
◆ str_equal()
      
        
          | bool str_equal | ( | const void * | a, | 
        
          |  |  | const void * | b | 
        
          |  | ) |  |  | 
      
 
- Parameters
- 
  
    | a | pointer to a string |  | b | pointer to a string |  
 
- Returns
- true if values are equal
Checks if two strings are equal. 
Definition at line 31 of file compare.c.