mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 23:28:48 +00:00
transform into odin-site parsable format
This commit is contained in:
@@ -12,10 +12,10 @@ Ascii_Set :: distinct [8]u32
|
||||
/*
|
||||
Creates an Ascii_Set with unique characters from the input string.
|
||||
|
||||
Inputs:
|
||||
**Inputs**
|
||||
- chars: A string containing characters to include in the Ascii_Set.
|
||||
|
||||
Returns:
|
||||
**Returns**
|
||||
- as: An Ascii_Set with unique characters from the input string.
|
||||
- ok: false if any character in the input string is not a valid ASCII character.
|
||||
*/
|
||||
@@ -33,11 +33,11 @@ ascii_set_make :: proc(chars: string) -> (as: Ascii_Set, ok: bool) #no_bounds_ch
|
||||
/*
|
||||
Determines if a given char is contained within an Ascii_Set.
|
||||
|
||||
Inputs:
|
||||
**Inputs**
|
||||
- as: The Ascii_Set to search.
|
||||
- c: The char to check for in the Ascii_Set.
|
||||
|
||||
Returns: A boolean indicating if the byte is contained in the Ascii_Set (true) or not (false).
|
||||
**Returns** A boolean indicating if the byte is contained in the Ascii_Set (true) or not (false).
|
||||
*/
|
||||
ascii_set_contains :: proc(as: Ascii_Set, c: byte) -> bool #no_bounds_check {
|
||||
return as[c>>5] & (1<<(c&31)) != 0
|
||||
|
||||
Reference in New Issue
Block a user