diff options
author | Richard Walters <rwalters@digitalstirling.com> | 2018-07-01 16:08:20 -0700 |
---|---|---|
committer | Richard Walters <rwalters@digitalstirling.com> | 2018-07-01 16:08:20 -0700 |
commit | cdc3f449812d0d45a3ea271636d669eb05ba3751 (patch) | |
tree | 1f46bea16d444b84a84843aed8bc9a0ebcadced5 /src/IsCharacterInSet.hpp | |
parent | 0a991ade05f2e98b412301cb47cb6112a374ee8c (diff) |
Refactoring
* Extract IsCharacterInSet to its own module.
* Extract PercentEncodedCharacterDecoder to its own module.
Diffstat (limited to 'src/IsCharacterInSet.hpp')
-rw-r--r-- | src/IsCharacterInSet.hpp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/IsCharacterInSet.hpp b/src/IsCharacterInSet.hpp new file mode 100644 index 0000000..f17460c --- /dev/null +++ b/src/IsCharacterInSet.hpp @@ -0,0 +1,37 @@ +#ifndef URI_IS_CHARACTER_IN_SET_HPP +#define URI_IS_CHARACTER_IN_SET_HPP + +/** + * @file IsCharacterInSet.hpp + * + * This module declares the Uri::IsCharacterInSet class. + * + * © 2018 by Richard Walters + */ + +#include <initializer_list> + +namespace Uri { + + /** + * This function determines whether or not the given character + * is in the given character set. + * + * @param[in] c + * This is the character to check. + * + * @param[in] characterSet + * This is the set of characters that are allowed. + * + * @return + * An indication of whether or not the given character + * is in the given character set is returned. + */ + bool IsCharacterInSet( + char c, + std::initializer_list< char > characterSet + ); + +} + +#endif /* URI_IS_CHARACTER_IN_SET_HPP */ |