Ruby: include/ruby/internal/ctype.h File Reference

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

Macros | Functions
ctype.h File Reference

Our own, locale independent, character handling routines. More...

`#include "ruby/internal/config.h"`
`#include "ruby/internal/attr/artificial.h"`
`#include "ruby/internal/attr/const.h"`
`#include "ruby/internal/attr/constexpr.h"`
`#include "ruby/internal/dllexport.h"`

Go to the source code of this file.

## Macros
#define | ISASCII rb_isascii
#define | ISPRINT rb_isprint
#define | ISGRAPH rb_isgraph
#define | ISSPACE rb_isspace
#define | ISUPPER rb_isupper
#define | ISLOWER rb_islower
#define | ISALNUM rb_isalnum
#define | ISALPHA rb_isalpha
#define | ISDIGIT rb_isdigit
#define | ISXDIGIT rb_isxdigit
#define | ISBLANK rb_isblank
#define | ISCNTRL rb_iscntrl
#define | ISPUNCT rb_ispunct
#define | TOUPPER rb_toupper
#define | TOLOWER rb_tolower
#define | STRCASECMP st_locale_insensitive_strcasecmp
#define | STRNCASECMP st_locale_insensitive_strncasecmp
#define | STRTOUL ruby_strtoul

## Functions
int | st_locale_insensitive_strcasecmp (const char *s1, const char *s2)
int | st_locale_insensitive_strncasecmp (const char *s1, const char *s2, size_t n)
unsigned long | ruby_strtoul (const char *str, char **endptr, int base)

## Detailed Description

Our own, locale independent, character handling routines.

Author
  Ruby developers ruby-.nosp@m.core.nosp@m.@ruby.nosp@m.-lan.nosp@m.g.org

Copyright
  This file is a part of the programming language Ruby. Permission is hereby granted, to either redistribute and/or modify this file, provided that the conditions mentioned in the file COPYING are met. Consult the file for details.

Warning
  Symbols prefixed with either `RBIMPL` or `rbimpl` are implementation details. Don't take them as canon. They could rapidly appear then vanish. The name (path) of this header file is also an implementation detail. Do not expect it to persist at the place it is now. Developers are free to move it anywhere anytime at will.

Note
  To ruby-core: remember that this header can be possibly recursively included from extension libraries written in C++. Do not expect for instance `__VA_ARGS__` is always available. We assume C99 for ruby itself but we don't assume languages of extension libraries. They could be written in C++98.

Definition in file ctype.h.

## Macro Definition Documentation

## ◆ ISALNUM

#define ISALNUM rb_isalnum

Definition at line 41 of file ctype.h.

## ◆ ISALPHA

#define ISALPHA rb_isalpha

Definition at line 42 of file ctype.h.

## ◆ ISASCII

#define ISASCII rb_isascii

Definition at line 35 of file ctype.h.

## ◆ ISBLANK

#define ISBLANK rb_isblank

Definition at line 45 of file ctype.h.

## ◆ ISCNTRL

#define ISCNTRL rb_iscntrl

Definition at line 46 of file ctype.h.

## ◆ ISDIGIT

#define ISDIGIT rb_isdigit

Definition at line 43 of file ctype.h.

## ◆ ISGRAPH

#define ISGRAPH rb_isgraph

Definition at line 37 of file ctype.h.

## ◆ ISLOWER

#define ISLOWER rb_islower

Definition at line 40 of file ctype.h.

## ◆ ISPRINT

#define ISPRINT rb_isprint

Definition at line 36 of file ctype.h.

## ◆ ISPUNCT

#define ISPUNCT rb_ispunct

Definition at line 47 of file ctype.h.

## ◆ ISSPACE

#define ISSPACE rb_isspace

Definition at line 38 of file ctype.h.

## ◆ ISUPPER

#define ISUPPER rb_isupper

Definition at line 39 of file ctype.h.

## ◆ ISXDIGIT

#define ISXDIGIT rb_isxdigit

Definition at line 44 of file ctype.h.

## ◆ STRCASECMP

#define STRCASECMP st_locale_insensitive_strcasecmp

Definition at line 52 of file ctype.h.

## ◆ STRNCASECMP

#define STRNCASECMP st_locale_insensitive_strncasecmp

Definition at line 53 of file ctype.h.

## ◆ STRTOUL

#define STRTOUL ruby_strtoul

Definition at line 54 of file ctype.h.

## ◆ TOLOWER

#define TOLOWER rb_tolower

Definition at line 51 of file ctype.h.

## ◆ TOUPPER

#define TOUPPER rb_toupper

Definition at line 50 of file ctype.h.

## Function Documentation

## ◆ ruby_strtoul()

unsigned long ruby_strtoul | ( | const char * | str,
|  | char ** | endptr,
|  | int | base
| ) |  |

Definition at line 134 of file util.c.

References ISSPACE, len, long(), ruby_scan_digits(), and str.

## ◆ st_locale_insensitive_strcasecmp()

int st_locale_insensitive_strcasecmp | ( | const char * | s1,
|  | const char * | s2
| ) |  |

Definition at line 1930 of file st.c.

## ◆ st_locale_insensitive_strncasecmp()

int st_locale_insensitive_strncasecmp | ( | const char * | s1,
|  | const char * | s2,
|  | size_t | n
| ) |  |

Definition at line 1954 of file st.c.