| summaryrefslogtreecommitdiff |
diff options
| author | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2017-04-22 21:33:47 +0200 |
|---|---|---|
| committer | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2017-04-22 21:33:47 +0200 |
| commit | 1d32728b9712702c9bca90d6dac370ff5fe2c214 (patch) | |
| tree | 25755963d66e842490eb4d4be8094b7674a85ae0 /src/core/char.h | |
Initial Commit
Diffstat (limited to 'src/core/char.h')
| -rw-r--r-- | src/core/char.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/core/char.h b/src/core/char.h new file mode 100644 index 0000000..fb4998e --- /dev/null +++ b/src/core/char.h @@ -0,0 +1,27 @@ +#ifndef _JH_CORE_CHAR_H_ +#define _JH_CORE_CHAR_H_ + +#include "char_types.h" + +/* Compares two words. {word_a} does not have to be null terminated. */ +/*@ + @ requires null_terminated_string(word_b); + @ requires ((length(word_a) * sizeof(JH_char)) == word_a_size); + @ ensures ((\result == 1) || (\result == 0) || (\result == -1)); + @*/ +int JH_word_cmp +( + const JH_char word_a [const static 1], + const size_t word_a_size, + const JH_char word_b [const static 1], + const size_t word_b_size +); + +/* + * Returns the lowercase equivalent of JH_char that are included in ['A','Z']. + * Other JH_char are returned untouched. + */ +JH_char JH_char_to_lowercase (const JH_char c); + +#endif + |


