Go to the source code of this file.
 | 
| int  | x_atoi (const char *x) | 
|   | string (in base 10) to int  
  | 
|   | 
| int  | atoi_base (const char *nb, const char *base) | 
|   | string (in custom base) to int  
  | 
|   | 
| char *  | x_calloc (int n) | 
|   | malloc n char and fill with 0  
  | 
|   | 
| char **  | x_ccalloc (int n) | 
|   | malloc n char * and fill with 0  
  | 
|   | 
| char *  | x_itoa (int x) | 
|   | int to string (malloc'd) in base 10 (0123456789)  
  | 
|   | 
| char *  | itoa_base (int nb, char const *base) | 
|   | int to string (malloc'd) in base len(base) (base)  
  | 
|   | 
| double  | x_atod (char const *str) | 
|   | string (in base 10) to double  
  | 
|   | 
| double  | x_atod_err (char const *str, int *is_error) | 
|   | string (in base 10) to double  
  | 
|   | 
| float  | x_atof (const char *str) | 
|   | string (in base 10) to float  
  | 
|   | 
| float  | x_atof_err (char const *str, int *is_error) | 
|   | string (in base 10) to float  
  | 
|   | 
◆ atoi_base()
      
        
          | int atoi_base  | 
          ( | 
          const char *  | 
          nb,  | 
        
        
           | 
           | 
          const char *  | 
          base  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
string (in custom base) to int 
len(base) must be > 1
- Parameters
 - 
  
    | nb | string to convert  | 
    | base | base to use (ex for base 10: "0123456789") | 
  
   
- Returns
 - 0 if any error;; the number (could be 0 too) 
 
 
 
◆ itoa_base()
      
        
          | char * itoa_base  | 
          ( | 
          int  | 
          nb,  | 
        
        
           | 
           | 
          char const *  | 
          base  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
int to string (malloc'd) in base len(base) (base) 
len(base) must be > 1
- Parameters
 - 
  
  
 
- Returns
 - NULL if any error;; the string 
 
 
 
◆ x_atod()
      
        
          | double x_atod  | 
          ( | 
          char const *  | 
          str | ) | 
           | 
        
      
 
string (in base 10) to double 
- Parameters
 - 
  
  
 
- Returns
 - 0 if any error;; the number (could be 0 too) 
 
 
 
◆ x_atod_err()
      
        
          | double x_atod_err  | 
          ( | 
          char const *  | 
          str,  | 
        
        
           | 
           | 
          int *  | 
          is_error  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
string (in base 10) to double 
- Parameters
 - 
  
    | str | string to convert  | 
    | is_error | if any error (is_error > 0 is an error) | 
  
   
- Returns
 - 0 if any error;; the number (could be 0 too) 
 
 
 
◆ x_atof()
      
        
          | float x_atof  | 
          ( | 
          const char *  | 
          str | ) | 
           | 
        
      
 
string (in base 10) to float 
- Parameters
 - 
  
  
 
- Returns
 - 0 if any error;; the number (could be 0 too) 
 
 
 
◆ x_atof_err()
      
        
          | float x_atof_err  | 
          ( | 
          char const *  | 
          str,  | 
        
        
           | 
           | 
          int *  | 
          is_error  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
string (in base 10) to float 
- Parameters
 - 
  
    | str | string to convert  | 
    | is_error | if any error (is_error > 0 is an error) | 
  
   
- Returns
 - 0 if any error;; the number (could be 0 too) 
 
 
 
◆ x_atoi()
      
        
          | int x_atoi  | 
          ( | 
          const char *  | 
          x | ) | 
           | 
        
      
 
string (in base 10) to int 
- Parameters
 - 
  
  
 
- Returns
 - 0 if any error;; the number (could be 0 too) 
 
 
 
◆ x_calloc()
malloc n char and fill with 0 
- Parameters
 - 
  
  
 
- Returns
 - ptr to the first n allocated 
 
 
 
◆ x_ccalloc()
      
        
          | char ** x_ccalloc  | 
          ( | 
          int  | 
          n | ) | 
           | 
        
      
 
malloc n char * and fill with 0 
- Parameters
 - 
  
  
 
- Returns
 - ptr to the first n allocated 
 
 
 
◆ x_itoa()
int to string (malloc'd) in base 10 (0123456789) 
- Parameters
 - 
  
  
 
- Returns
 - NULL if any error;; the string