The Std.core module contains basic types and algorithms. It is the base of all other modules of the standard Std workspace.
You will find collections like Array or HashTable, a dynamic String and so on.
const Core.Constants | [src] |
ASSERT | bool | |
BIG_ENDIAN | bool | |
EndLine | string | |
CharProperties | const [256] Latin1.CharAttribute | |
AltDirectorySeparatorChar | u8 | |
DirectorySeparatorChar | u8 | |
VolumeSeparatorChar | u8 | |
NN | s32 | |
StringSmallSize | u64 | |
DayOfWeekNames | const [7] string | |
DaysPer100Years | s32 | |
DaysPer400Years | s32 | |
DaysPer4Years | s32 | |
DaysPerYear | s32 | |
DaysTo10000 | u64 | Number of days from 1/1/0001 to 12/31/9999. |
DaysTo1601 | u64 | Number of days from 1/1/0001 to 12/31/1600. |
DaysTo1899 | u64 | Number of days from 1/1/0001 to 12/30/1899. |
DaysTo1970 | u64 | Number of days from 1/1/0001 to 12/31/1969. |
DaysToMonth365 | const [13] u16 | |
DaysToMonth366 | const [13] u16 | |
MaxMilliSeconds | u64 | |
MaxMillis | u64 | |
MaxTicks | u64 | |
MillisPerDay | u64 | |
MillisPerHour | u64 | |
MillisPerMinute | u64 | |
MillisPerSecond | u64 | |
MonthNames | const [12] string | |
TicksPerDay | u64 | |
TicksPerHour | u64 | |
TicksPerMilliSecond | u64 | |
TicksPerMinute | u64 | |
TicksPerSecond | u64 | |
RuneError | rune | |
Surr1 | u32 | |
Surr2 | u32 | |
Surr3 | u32 | |
SurrSelf | u32 | |
MaxRunes | rune | |
RuneError | rune | |
SurrogateMax | rune | |
SurrogateMin | rune | |
WINDOWS | bool |
type alias Env.Type Aliases | [src] |
ProcessHandle | Env.ProcessHandle | |
FileHandle | File.FileHandle | |
VirtualKey | Input.VirtualKey | |
ConstF32 | Math.ConstF32 | |
ConstF64 | Math.ConstF64 | |
ThreadHandle | Threading.ThreadHandle | |
Ticks | Time.Ticks | |
TimerHandle | Time.TimerHandle |
struct Core.Array | [src] |
This is a generic dynamic array.
allocator | Swag.IAllocator | Associated allocator. |
buffer | ^Array.T | Memory block of all datas. |
count | u64 | Number of valid datas. |
capacity | u64 | Number of elements that can be stored in the buffer. |
add(self, &&T) | Move one element at the end of the array. |
add(self, T) | Add a copy of one element at the end of the array. |
add(self, const [..] T) | Append a slice to the end of this instance. |
addOnce | Add a copy of one element at the end of the array. |
back | Returns a copy of the last element. |
backPtr | Returns the address of the last element. |
clear | Set the number of elements to 0. |
contains | Returns true if the given value is in the array. |
createBuffer | Create a working buffer. |
createTemp | Create a temporary array. |
emplaceAddress | Reserve room at the end of the array for num elements, but does not initialize them. Returns the address of the first element. |
emplaceAt | Move some values at the given index. If index is equal to count, then the values are moved at the end of the array. Order is preserved. |
emplaceInitAddress | Reserve room at the end of the array for num elements. |
fill | Fill the array with the given value. |
free | Free the array content. |
front | Returns a copy of the first element. |
frontPtr | Returns the address of the first element. |
grow | Ensure the Array is big enough to store at least newCount elements. |
growResize | Ensure that at least newCount elements are present and initizalized in the array. |
insertAt(self, u64, &&T) | Move a value at the given index. If index is equal to count, then the value is added at the end of the array. Order is preserved. |
insertAt(self, u64, T) | Insert a value at the given index. If index is equal to count, then the value is added at the end of the array. Order is preserved. |
insertAt(self, u64, const [..] T) | Insert some values at the given index. If index is equal to count, then the values are added at the end of the array. Order is preserved. |
isEmpty | Returns true if the array is empty. |
popBack | Returns a copy of the last element, and remove it from the array. |
realloc | |
ref1 | Returns a reference to a value given coordinate. |
ref2 | Returns a reference to a value given 2 coordinates and a width. |
remove(self, V) | Remove the given value If not found, does nothing. |
remove(self, u64, u64) | Remove num elements starting at index. |
removeAt | Remove an element at index by replacing it with the last element. |
removeAtOrdered | Remove numValues elements at index by shifting all others. |
removeBack | Remove the last element. |
removeOrdered | Remove the given value If not found, does nothing. |
reserve | Reserve room for newCapacity elements without changing the array count. |
resize | Change the number of valid elements in the array. |
sort(self) | Sort array. |
sort(self, func(*void, T, T)->s32) | Sort array. |
sortReverse | Sort array in reverse order (from biggest to lowest value). |
swap | Swap two elements. |
toSlice(self) | Returns a slice. |
toSlice(self) | Returns a slice. |
opAffect | Initializes an Array that contains values copied from the specified array. |
opCast(self) | |
opCast(self) | |
opCount | |
opData | |
opDrop | |
opIndex(self, u64) | |
opIndex(self, u64) | |
opIndexAffect | |
opIndexAssign | |
opPostCopy | |
opSlice | |
opVisit | Visit every elements of the array. |
func IConvert.convert | [src] |
func Array.add | [src] |
Add a copy of one element at the end of the array.
Move one element at the end of the array.
Append a slice to the end of this instance.
func Array.addOnce | [src] |
Add a copy of one element at the end of the array.
func Array.back | [src] |
Returns a copy of the last element.
func Array.backPtr | [src] |
Returns the address of the last element.
func Array.clear | [src] |
Set the number of elements to 0.
func Array.contains | [src] |
Returns true if the given value is in the array.
func Array.createBuffer | [src] |
Create a working buffer.
func Array.createTemp | [src] |
Create a temporary array.
func Array.emplaceAddress | [src] |
Reserve room at the end of the array for num elements, but does not initialize them. Returns the address of the first element.
func Array.emplaceAt | [src] |
Move some values at the given index. If index is equal to count, then the values are moved at the end of the array. Order is preserved.
func Array.emplaceInitAddress | [src] |
Reserve room at the end of the array for num elements.
Returns the address of the first element
func Array.fill | [src] |
Fill the array with the given value.
func Array.free | [src] |
Free the array content.
func Array.front | [src] |
Returns a copy of the first element.
func Array.frontPtr | [src] |
Returns the address of the first element.
func Array.grow | [src] |
Ensure the Array is big enough to store at least newCount elements.
The number of valid elements does not change. If you want the number of valid elements to be changed also, use [[growResize]] instead.
func Array.growResize | [src] |
Ensure that at least newCount elements are present and initizalized in the array.
This will grow the array if necessary.
func Array.insertAt | [src] |
Insert a value at the given index. If index is equal to count, then the value is added at the end of the array. Order is preserved.
Move a value at the given index. If index is equal to count, then the value is added at the end of the array. Order is preserved.
Insert some values at the given index. If index is equal to count, then the values are added at the end of the array. Order is preserved.
func Array.isEmpty | [src] |
Returns true if the array is empty.
func Array.opAffect | [src] |
Initializes an Array that contains values copied from the specified array.
func Array.opCast | [src] |
func Array.opCount | [src] |
func Array.opData | [src] |
func Array.opDrop | [src] |
func Array.opIndex | [src] |
func Array.opIndexAffect | [src] |
func Array.opIndexAssign | [src] |
func Array.opPostCopy | [src] |
func Array.opSlice | [src] |
func Array.opVisit | [src] |
Visit every elements of the array.
Visiting by address and in reverse order is supported.
func Array.popBack | [src] |
Returns a copy of the last element, and remove it from the array.
func Array.realloc | [src] |
func Array.ref1 | [src] |
Returns a reference to a value given coordinate.
This is to use the array as an array with 2 dimensions.
func Array.ref2 | [src] |
Returns a reference to a value given 2 coordinates and a width.
This is to use the array as an array with 2 dimensions.
func Array.remove | [src] |
Remove num elements starting at index.
Remove the given value If not found, does nothing.
func Array.removeAt | [src] |
Remove an element at index by replacing it with the last element.
Order is not preserved
func Array.removeAtOrdered | [src] |
Remove numValues elements at index by shifting all others.
Order is preserved
func Array.removeBack | [src] |
Remove the last element.
func Array.removeOrdered | [src] |
Remove the given value If not found, does nothing.
func Array.reserve | [src] |
Reserve room for newCapacity elements without changing the array count.
The number of valid elements does not change.
func Array.resize | [src] |
Change the number of valid elements in the array.
This can be used to reduce or increase the number of valid elements.
func Array.sort | [src] |
Sort array.
func Array.sortReverse | [src] |
Sort array in reverse order (from biggest to lowest value).
func Array.swap | [src] |
Swap two elements.
func Array.toSlice | [src] |
Returns a slice.
struct Core.ArrayPtr | [src] |
using base | Array'(*Core.ArrayPtr.T) |
addNewPtr | Allocate a new pointer, and add it to the array. |
clear | Release content. |
deletePtr | Delete one pointer allocated here. |
newPtr | Allocate a new pointer by using the contextual allocator. |
opDrop | |
opPostCopy |
func ArrayPtr.addNewPtr | [src] |
Allocate a new pointer, and add it to the array.
func ArrayPtr.clear | [src] |
Release content.
func ArrayPtr.deletePtr | [src] |
Delete one pointer allocated here.
func ArrayPtr.newPtr | [src] |
Allocate a new pointer by using the contextual allocator.
func ArrayPtr.opDrop | [src] |
func ArrayPtr.opPostCopy | [src] |
namespace Core.Atomic |
add(*s16, s16) | |
add(*s32, s32) | |
add(*s64, s64) | |
add(*s8, s8) | |
add(*u16, u16) | |
add(*u32, u32) | |
add(*u64, u64) | |
add(*u8, u8) | |
compareExchange(*s16, s16, s16) | |
compareExchange(*s32, s32, s32) | |
compareExchange(*s64, s64, s64) | |
compareExchange(*s8, s8, s8) | |
compareExchange(*u16, u16, u16) | |
compareExchange(*u32, u32, u32) | |
compareExchange(*u64, u64, u64) | |
compareExchange(*u8, u8, u8) | |
exchange(*s16, s16) | |
exchange(*s32, s32) | |
exchange(*s64, s64) | |
exchange(*s8, s8) | |
exchange(*u16, u16) | |
exchange(*u32, u32) | |
exchange(*u64, u64) | |
exchange(*u8, u8) | |
get(*s16) | |
get(*s32) | |
get(*s64) | |
get(*s8) | |
get(*u16) | |
get(*u32) | |
get(*u64) | |
get(*u8) | |
logicAnd(*s16, s16) | |
logicAnd(*s32, s32) | |
logicAnd(*s64, s64) | |
logicAnd(*s8, s8) | |
logicAnd(*u16, u16) | |
logicAnd(*u32, u32) | |
logicAnd(*u64, u64) | |
logicAnd(*u8, u8) | |
logicOr(*s16, s16) | |
logicOr(*s32, s32) | |
logicOr(*s64, s64) | |
logicOr(*s8, s8) | |
logicOr(*u16, u16) | |
logicOr(*u32, u32) | |
logicOr(*u64, u64) | |
logicOr(*u8, u8) | |
logicXor(*s16, s16) | |
logicXor(*s32, s32) | |
logicXor(*s64, s64) | |
logicXor(*s8, s8) | |
logicXor(*u16, u16) | |
logicXor(*u32, u32) | |
logicXor(*u64, u64) | |
logicXor(*u8, u8) |
func Atomic.add | [src] |
func Atomic.compareExchange | [src] |
func Atomic.exchange | [src] |
func Atomic.get | [src] |
func Atomic.logicAnd | [src] |
func Atomic.logicOr | [src] |
func Atomic.logicXor | [src] |
struct Core.BitArray | [src] |
Manages a compact array of bit values, which are represented as booleans, where true indicates that the bit is on (1) and false indicates the bit is off (0).
buffer | ^u32 | |
allocator | Swag.IAllocator | |
count | u64 | |
capacity | u64 |
andWith | Performs the bitwise AND operation between the elements of the current BitArray and the corresponding elements in the specified array. |
get | Gets the value of the bit at a specific position. |
invert(self) | Inverts all the bit values, so that elements set to true are changed to false, and elements set to false are changed to true. |
invert(self, u64) | Inverts the value of the bit at a specific position. |
orWith | Performs the bitwise OR operation between the elements of the current BitArray and the corresponding elements in the specified array. |
reserve(self, u64) | Reserve the given amount of bits. |
reserve(self, u64, bool) | Reserve the given amount of bits and set an initial value to all bits. |
set | Sets the bit at a specific position to the specified value. |
setAll | Sets all bits to the specified value. |
xorWith | Performs the bitwise XOR operation between the elements of the current BitArray and the corresponding elements in the specified array. |
opAffect | Initializes a BitArray that contains bit values copied from the specified array of booleans. |
opCount | |
opDrop | |
opEquals | Compares two arrays, and returns true if they are equal. |
opIndex | Gets the value of the bit at a specific position. |
opIndexAffect | Sets the value of the bit at a specific position. |
opPostCopy | |
opVisit | Visit all the booleans. |
func BitArray.andWith | [src] |
Performs the bitwise AND operation between the elements of the current BitArray and the corresponding elements in the specified array.
The current BitArray will be modified to store the result of the bitwise AND operation.
func BitArray.get | [src] |
Gets the value of the bit at a specific position.
func BitArray.invert | [src] |
Inverts the value of the bit at a specific position.
Inverts all the bit values, so that elements set to true are changed to false, and elements set to false are changed to true.
func BitArray.opAffect | [src] |
Initializes a BitArray that contains bit values copied from the specified array of booleans.
func BitArray.opCount | [src] |
func BitArray.opDrop | [src] |
func BitArray.opEquals | [src] |
Compares two arrays, and returns true if they are equal.
func BitArray.opIndex | [src] |
Gets the value of the bit at a specific position.
func BitArray.opIndexAffect | [src] |
Sets the value of the bit at a specific position.
func BitArray.opPostCopy | [src] |
func BitArray.opVisit | [src] |
Visit all the booleans.
func BitArray.orWith | [src] |
Performs the bitwise OR operation between the elements of the current BitArray and the corresponding elements in the specified array.
The current BitArray will be modified to store the result of the bitwise OR operation.
func BitArray.reserve | [src] |
Reserve the given amount of bits.
The bits will not be initialized.
Reserve the given amount of bits and set an initial value to all bits.
func BitArray.set | [src] |
Sets the bit at a specific position to the specified value.
func BitArray.setAll | [src] |
Sets all bits to the specified value.
func BitArray.xorWith | [src] |
Performs the bitwise XOR operation between the elements of the current BitArray and the corresponding elements in the specified array.
The current BitArray will be modified to store the result of the bitwise XOR operation.
struct Core.ByteStream | [src] |
readBuffer | const [..] u8 | |
writeBuffer | *Array'(u8) | |
seek | u64 | |
eof | bool |
getSeek | Returns the seek value. |
isEof | Returns true if end has been reached. |
length | Returns length of associated slice. |
moveSeek | Seek to the next byte. |
openRead | Creates a byte stream to read from a slice. |
openWrite | Creates a byte stream to write to an array. |
peekU8 | Read one byte and seek. |
readBytes | Read the given amount of bytes. |
readData | Get the buffer of datas to read. |
readNative | Read a native type value. |
readU8 | Read one byte and seek. |
remainReadToSlice | Returns a slice of the remaing bytes to read. |
remainReadToString | Returns a string of the remaing bytes to read. |
setSeek | Seek to the given position. |
writeBytes | Write the given amount of bytes. |
writeNative | Write a native type value. |
func ByteStream.getSeek | [src] |
Returns the seek value.
func ByteStream.isEof | [src] |
Returns true if end has been reached.
func ByteStream.length | [src] |
Returns length of associated slice.
func ByteStream.moveSeek | [src] |
Seek to the next byte.
func ByteStream.openRead | [src] |
Creates a byte stream to read from a slice.
func ByteStream.openWrite | [src] |
Creates a byte stream to write to an array.
func ByteStream.peekU8 | [src] |
Read one byte and seek.
func ByteStream.readBytes | [src] |
Read the given amount of bytes.
func ByteStream.readData | [src] |
Get the buffer of datas to read.
func ByteStream.readNative | [src] |
Read a native type value.
func ByteStream.readU8 | [src] |
Read one byte and seek.
func ByteStream.remainReadToSlice | [src] |
Returns a slice of the remaing bytes to read.
func ByteStream.remainReadToString | [src] |
Returns a string of the remaing bytes to read.
func ByteStream.setSeek | [src] |
Seek to the given position.
func ByteStream.writeBytes | [src] |
Write the given amount of bytes.
func ByteStream.writeNative | [src] |
Write a native type value.
enum Core.CharacterSet | [src] |
Latin1 | |
Unicode |
namespace Core.CommandLine |
IsSet | The IsSet generic struct is a mirror of the user input struct. |
ParseOptions | |
Result | Result of the [parse] function. |
getField | |
isOption | Returns true if oneArg is a valid option (starting with a delimiter). |
parse | Parse all the arguments and fill the result. |
splitArguments | Clean and split a list of arguments -option:value or -option=value => -option value. |
ArgParams |
attr CommandLine.ArgParams | [src] |
struct CommandLine.IsSet | [src] |
The IsSet generic struct is a mirror of the user input struct.
Each field has the same name as the original one, but with a bool type.
It will indicate, after the command line parsing, that the corresponding argument has been specified or not by the user.
struct CommandLine.ParseOptions | [src] |
struct CommandLine.Result | [src] |
Result of the [parse] function.
isSet | CommandLine.IsSet'(Core.CommandLine.IsSet.T) |
func CommandLine.getField | [src] |
func CommandLine.isOption | [src] |
Returns true if oneArg is a valid option (starting with a delimiter).
func CommandLine.parse | [src] |
Parse all the arguments and fill the result.
func parse.checkNext | [src] |
func CommandLine.splitArguments | [src] |
Clean and split a list of arguments -option:value or -option=value => -option value.
namespace Core.Compress |
BitStream | |
Deflate | |
Inflate | |
ZLib |
struct Compress.BitStream | [src] |
stream | const [..] u8 | |
curByte | u64 | |
codeBuffer | u32 | |
numBits | u8 | |
eof | bool |
consumeBits | |
curPtr | |
discardToNextByte | |
init | |
peek32 | |
peek32Be | |
peekBits | |
peekBitsNoRefill | |
peekBytes | |
readBits | |
readBitsNoRefill | |
refill | |
revert | |
size | |
startPtr |
func BitStream.consumeBits | [src] |
func BitStream.curPtr | [src] |
func BitStream.discardToNextByte | [src] |
func BitStream.init | [src] |
func BitStream.peek32 | [src] |
func BitStream.peek32Be | [src] |
func BitStream.peekBits | [src] |
func BitStream.peekBitsNoRefill | [src] |
func BitStream.peekBytes | [src] |
func BitStream.readBits | [src] |
func BitStream.readBitsNoRefill | [src] |
func BitStream.refill | [src] |
func BitStream.revert | [src] |
func BitStream.size | [src] |
func BitStream.startPtr | [src] |
struct Compress.Deflate | [src] |
compress | Compress the source buffer. |
init | Initialize the compressor Can be called multiple times. |
opDrop |
enum Deflate.CompressionFlags | [src] |
Zero | |
ComputeAdler32 | |
Default |
enum Deflate.CompressionLevel | [src] |
NoCompression | |
BestSpeed | |
Default | |
BestCompression | |
UberCompression |
enum Deflate.CompressionStrategy | [src] |
Default | |
Filtered | |
HuffmanOnly | |
Rle | |
Fixed |
func Deflate.compress | [src] |
Compress the source buffer.
func Deflate.init | [src] |
Initialize the compressor Can be called multiple times.
func Deflate.opDrop | [src] |
struct Compress.Inflate | [src] |
decompress | Decompress the associated stream. |
func Inflate.decompress | [src] |
Decompress the associated stream.
struct Compress.ZLib | [src] |
compress | Decompress stream. |
decompress | Decompress stream. |
func ZLib.compress | [src] |
Decompress stream.
func ZLib.decompress | [src] |
Decompress stream.
struct Core.ConcatBuffer | [src] |
Represents a growable buffer, which is divided in buckets to avoid a copy/realloc when the buffer needs to increase its size. This is the main difference with Array.
allocator | Swag.IAllocator | |
firstBucket | *ConcatBufferBucket | |
curBucket | *ConcatBufferBucket | |
lastBucket | *ConcatBufferBucket | |
currentSP | ^u8 | |
granularity | u64 | |
isAtEnd | bool | |
viewFirstBucket | ConcatBufferBucket |
addBytes | Append a slice of bytes to the buffer If contiguous is false, the slice will be divided in chunks if necessary. |
addNative | Append one byte to the buffer. |
addStruct | Append the content of a struct. |
clear | Clear the content without freing the buffers. |
count | Returns the number of bytes. |
getOffset | Get the linearized seek offset. |
getSeek | Returns the current seek in the buffer. |
grow | Be sure that there is enough room to store at least numBytes bytes. |
makeLinear | linearize all buckets in one single big bucket. |
moveSeek | Seek current write pointer. |
moveToString | Move the content of the buffer to the String if possible. |
release | Release all allocated buffers. |
setAllocator | Associate an allocator with the buffer. |
setBucketSize | Set the granularity of datas when allocated new buckets. Minimum size is 4. |
setEndSeek | Set the end seek. |
setFirstBucket | Share data with the firstBucket. |
setSeek | Set the current seek. |
toSlice | Convert to a slice only if the buffer is linear, or return null. |
toString | Convert the buffer to a String. |
opCount | |
opDrop | |
opVisit | Visit all valid buckets. |
func ConcatBuffer.addBytes | [src] |
Append a slice of bytes to the buffer If contiguous is false, the slice will be divided in chunks if necessary.
func ConcatBuffer.addNative | [src] |
Append one byte to the buffer.
func ConcatBuffer.addStruct | [src] |
Append the content of a struct.
func ConcatBuffer.clear | [src] |
Clear the content without freing the buffers.
func ConcatBuffer.count | [src] |
Returns the number of bytes.
func ConcatBuffer.getOffset | [src] |
Get the linearized seek offset.
func ConcatBuffer.getSeek | [src] |
Returns the current seek in the buffer.
func ConcatBuffer.grow | [src] |
Be sure that there is enough room to store at least numBytes bytes.
func ConcatBuffer.makeLinear | [src] |
linearize all buckets in one single big bucket.
func ConcatBuffer.moveSeek | [src] |
Seek current write pointer.
func ConcatBuffer.moveToString | [src] |
Move the content of the buffer to the String if possible.
If a direct move is not possible because the buffer contains more than on bucket, then a copy will be made instead.
func ConcatBuffer.opCount | [src] |
func ConcatBuffer.opDrop | [src] |
func ConcatBuffer.opVisit | [src] |
Visit all valid buckets.
func ConcatBuffer.release | [src] |
Release all allocated buffers.
func ConcatBuffer.setAllocator | [src] |
Associate an allocator with the buffer.
The allocator can only be changed if the buffer has no pending buckets.
func ConcatBuffer.setBucketSize | [src] |
Set the granularity of datas when allocated new buckets. Minimum size is 4.
func ConcatBuffer.setEndSeek | [src] |
Set the end seek.
func ConcatBuffer.setFirstBucket | [src] |
Share data with the firstBucket.
func ConcatBuffer.setSeek | [src] |
Set the current seek.
func ConcatBuffer.toSlice | [src] |
Convert to a slice only if the buffer is linear, or return null.
func ConcatBuffer.toString | [src] |
Convert the buffer to a String.
A copy will be made, so the buffer is still valid after the call. See ConcatBuffer.moveToString
struct Core.ConcatBufferBucket | [src] |
datas | ^u8 | |
next | *ConcatBufferBucket | |
count | u64 | |
size | u64 | |
countBefore | u64 |
struct Core.ConcatBufferSeek | [src] |
bucket | *ConcatBufferBucket | |
sp | ^u8 |
namespace Core.Console |
Color |
fatal | Fatal error Exit the process with code -1. |
lock | Use to access console with multiple threads. |
Write a bunch of parameters to the console. | |
printf | Write a formatted message to the console. |
println | Write a line to the console. |
prompt | Wait for using input, and returns the corresponding string. |
resetColor | Restore the console colors to their default values. |
setBackColor | Set the console background color. |
setTextColor | Set the console foreground color. |
silent | Disable console output. This is a counter, so can be called multiple times with the same value Like any other console functions, this is not thread-safe => call lock before if necessary, and unlock after. |
unlock |
enum Console.Color | [src] |
Black | |
White | |
Gray | |
Red | |
Blue | |
Green | |
Cyan | |
Yellow | |
Magenta | |
DarkRed | |
DarkBlue | |
DarkGreen | |
DarkCyan | |
DarkYellow | |
DarkMagenta |
func Console.fatal | [src] |
Fatal error Exit the process with code -1.
func Console.lock | [src] |
Use to access console with multiple threads.
No console function is thread safe, so it is the user responsability to lock the console when necessary
func Console.print | [src] |
Write a bunch of parameters to the console.
func Console.printf | [src] |
Write a formatted message to the console.
func Console.println | [src] |
Write a line to the console.
func Console.prompt | [src] |
Wait for using input, and returns the corresponding string.
func Console.resetColor | [src] |
Restore the console colors to their default values.
func Console.setBackColor | [src] |
Set the console background color.
func Console.setTextColor | [src] |
Set the console foreground color.
func Console.silent | [src] |
Disable console output. This is a counter, so can be called multiple times with the same value Like any other console functions, this is not thread-safe => call lock before if necessary, and unlock after.
func Console.unlock | [src] |
namespace Core.Debug |
assert | |
breakPanic | |
safety | |
safetyBoundCheck |
func Debug.assert | [src] |
func Debug.breakPanic | [src] |
func Debug.safety | [src] |
func Debug.safetyBoundCheck | [src] |
namespace Core.Debugger |
attach | Try to attach to a debugger by calling "vsjitdebugger.exe" If it works, it will open a dialog box to pickup a visual studio instance. |
debugBreak | Trigger a breakpoint. |
isAttached | Returns true if a debugger is attached to the current process. |
log | Debug log. |
func Debugger.attach | [src] |
Try to attach to a debugger by calling "vsjitdebugger.exe" If it works, it will open a dialog box to pickup a visual studio instance.
func Debugger.debugBreak | [src] |
Trigger a breakpoint.
func Debugger.isAttached | [src] |
Returns true if a debugger is attached to the current process.
func Debugger.log | [src] |
Debug log.
namespace Core.Directory |
EnumerationOptions |
create | |
enumerate | Enumerate a directory. |
enumerateDirectories | Get all the directories in the given directory. |
enumerateFiles | Get all the files of the given directory. |
exists | Returns true if the given directory exists. |
getCurrent | Returns the current directory. |
getDrives | Get the list of logical drives. |
getVolumes | Get the list of volumes. |
setCurrent | Set the current directory. |
struct Directory.EnumerationOptions | [src] |
matchExtension | string | |
skipAttributes | File.FileAttributes | |
recurse | bool | |
wantFiles | bool | |
wantDirectories | bool | |
wantSpecialDirectories | bool | |
filterLambda | func(File.FileInfo)->bool |
func Directory.create | [src] |
func Directory.enumerate | [src] |
Enumerate a directory.
func Directory.enumerateDirectories | [src] |
Get all the directories in the given directory.
func Directory.enumerateFiles | [src] |
Get all the files of the given directory.
func Directory.exists | [src] |
Returns true if the given directory exists.
func Directory.getCurrent | [src] |
Returns the current directory.
func Directory.getDrives | [src] |
Get the list of logical drives.
func Directory.getVolumes | [src] |
Get the list of volumes.
func Directory.setCurrent | [src] |
Set the current directory.
namespace Core.Env |
Monitor | Describes a physical monitor. |
Process | |
StartInfo |
SpecialDirectory |
doSyncProcess | Starts a new process with arguments, and wait for it to be done. |
exit | Exit the current process. |
getArg | Get a given argument, or null. |
getArgs | Get the program command line arguments as a [..] string. |
getMonitors | Get the list of all monitors. |
getSpecialDirectory | The system font directory. |
hasArg | Get a given argument, or null. |
locateInExplorer | Locate file in the file explorer. |
locateUrl | Locate file in the internet explorer. |
startProcess(const &StartInfo) | Starts a new process with arguments. |
startProcess(string, string) | Starts a new process with arguments. |
struct Env.Monitor | [src] |
Describes a physical monitor.
rect | Math.Rectangle | |
work | Math.Rectangle | |
scale | f32 | Scale factor of this monitor. |
rectReal | Math.Rectangle | The real monitor rect, without scaling. |
workReal | Math.Rectangle | The real monitor work rect, without scaling. |
struct Env.Process | [src] |
handle | Env.ProcessHandle |
waitForExit | Wait for the process to be done. |
func Process.waitForExit | [src] |
Wait for the process to be done.
enum Env.SpecialDirectory | [src] |
Font | |
UserAppData | |
UserDocuments | |
CommonAppData | |
Desktop | |
UserPictures | |
UserVideos | |
UserMusic | |
CommonPictures | |
CommonVideos | |
CommonMusic |
struct Env.StartInfo | [src] |
fileName | string | |
arguments | string |
func Env.doSyncProcess | [src] |
Starts a new process with arguments, and wait for it to be done.
func Env.exit | [src] |
Exit the current process.
func Env.getArg | [src] |
Get a given argument, or null.
func Env.getArgs | [src] |
Get the program command line arguments as a [..] string.
func Env.getMonitors | [src] |
Get the list of all monitors.
func Env.getSpecialDirectory | [src] |
The system font directory.
func Env.hasArg | [src] |
Get a given argument, or null.
func Env.locateInExplorer | [src] |
Locate file in the file explorer.
func Env.locateUrl | [src] |
Locate file in the internet explorer.
func Env.startProcess | [src] |
Starts a new process with arguments.
namespace Core.Errors |
BadParameterError | |
FileNotFoundError | |
InvalidFileNameError | |
InvalidFormatError | |
InvalidVersion | |
OverflowError | |
ParseIncompleteError | |
SerializationError | |
SyntaxError | |
UnsupportedFormatError |
mkString | Make a string persistent for errors. |
struct Errors.BadParameterError | [src] |
using base | Swag.BaseError |
struct Errors.FileNotFoundError | [src] |
using base | Swag.BaseError | |
fileName | string |
struct Errors.InvalidFileNameError | [src] |
using base | Swag.BaseError | |
fileName | string |
struct Errors.InvalidFormatError | [src] |
using base | Swag.BaseError |
struct Errors.InvalidVersion | [src] |
wantedVersion | u32 | |
foundVersion | u32 |
struct Errors.OverflowError | [src] |
using base | Swag.BaseError |
struct Errors.ParseIncompleteError | [src] |
using base | Swag.BaseError |
struct Errors.SerializationError | [src] |
using base | Swag.BaseError | |
field | Swag.TypeValue | Can contain the bad field. |
struct Errors.SyntaxError | [src] |
using base | Swag.BaseError | |
line | u64 | |
col | u64 | |
seek | u64 |
struct Errors.UnsupportedFormatError | [src] |
using base | Swag.BaseError |
func Errors.mkString | [src] |
Make a string persistent for errors.
That kind of string can be stored in an error struct.
namespace Core.File |
FileInfo | |
FileStream | |
Folder | |
TextReader | |
TweakFile |
FileAccess | |
FileAttributes | |
FileMode | |
FileShare | |
SeekOrigin | |
TextEncoding |
delete | Delete the specified file. |
duplicate | Duplicate a file. |
exists | Returns true if the given file exists. |
getAttributes | Returns attributes associated to the given filename. |
getFileInfo | Get informations about a file. |
getInfo | Returns various file informations. |
open | Open a new file stream. |
openRead | Creates a new file stream for reading. |
openWrite | Creates a new file stream for writing. |
readAllBytes | Read a file, and store the result in an array of bytes. |
readAllLines | Read all the lines of a file. |
readAllText | Read a file, and store the result in an utf8 string. |
readEachLines | Call user code for each line. |
touch | Change the file write date/time. |
writeAllBytes(string, const &ConcatBuffer) | Write a file with the content of a ConcatBuffer. |
writeAllBytes(string, const [..] u8) | Write a file with the content of a slice of bytes. |
writeAllLines | Write a file with the content of an array of string, one per line. |
enum File.FileAccess | [src] |
Read | |
Write | |
ReadWrite |
enum File.FileAttributes | [src] |
Zero | |
ReadOnly | |
Hidden | |
System | |
Directory | |
Archive | |
Device | |
Normal | |
Temporary | |
SparseFile | |
ReparsePoint | |
Compressed | |
Offline | |
NotContentIndexed | |
Encrypted |
struct File.FileInfo | [src] |
fullname | String | |
attributes | File.FileAttributes | |
creationTime | Time.DateTime | |
lastAccessTime | Time.DateTime | |
lastWriteTime | Time.DateTime | |
size | u64 |
isDirectory |
func FileInfo.isDirectory | [src] |
enum File.FileMode | [src] |
Append | |
Create | |
CreateNew | |
Open | |
OpenOrCreate | |
Truncate |
[src] |
Zero | |
Delete | |
Inheritable | |
Read | |
Write | |
ReadWrite |
struct File.FileStream | [src] |
name | String | |
handle | File.FileHandle | |
canRead | bool | |
canSeek | bool | |
canWrite | bool |
close | Close the given file stream. |
getPosition | Returns the current seek position of the given file stream. |
getSize | Returns the given file stream length on disk. |
isOpen | Returns true if the stream is valid. |
read | Read from the given file stream, and returns the number of bytes. |
readValue | Read from the given file stream, and returns true if all bytes have been read. |
setPosition | Set the current seek position of the given file stream. |
skipPosition | Skip bytes from current position. |
write | Write to the given file stream, and returns the number of written bytes. |
opDrop |
func FileStream.close | [src] |
Close the given file stream.
func FileStream.getPosition | [src] |
Returns the current seek position of the given file stream.
func FileStream.getSize | [src] |
Returns the given file stream length on disk.
func FileStream.isOpen | [src] |
Returns true if the stream is valid.
func FileStream.opDrop | [src] |
func FileStream.read | [src] |
Read from the given file stream, and returns the number of bytes.
func FileStream.readValue | [src] |
Read from the given file stream, and returns true if all bytes have been read.
func FileStream.setPosition | [src] |
Set the current seek position of the given file stream.
func FileStream.skipPosition | [src] |
Skip bytes from current position.
func FileStream.write | [src] |
Write to the given file stream, and returns the number of written bytes.
struct File.Folder | [src] |
type | const *Swag.TypeInfo | |
data | ^void |
enum File.SeekOrigin | [src] |
Begin | |
Current | |
End |
enum File.TextEncoding | [src] |
Ascii | |
Utf8 |
struct File.TextReader | [src] |
stream | File.FileStream | |
buffer | Array'(u8) | |
encodingType | File.TextEncoding | |
byteSeek | u64 | |
bufferSize | u64 | |
checkPreamble | bool |
close | Close the reader. |
open | Open the reader. |
readLine | Read one line of text. |
readToEnd | Read from the current position to the end, and returns the corresponding utf8 string. |
func TextReader.close | [src] |
Close the reader.
func TextReader.open | [src] |
Open the reader.
func TextReader.readLine | [src] |
Read one line of text.
Returns false if the end of the stream has been reached.
func TextReader.readToEnd | [src] |
Read from the current position to the end, and returns the corresponding utf8 string.
struct File.TweakFile | [src] |
folders | Array'(Core.File.Folder) |
parse(self, const &Array'(string)) | Parse a list of lines. |
parse(self, string) | Parse a list of lines. |
parseFile | Read and parse a file. |
registerFolder | Register a new structure to be parsed. |
func TweakFile.parse | [src] |
Parse a list of lines.
func TweakFile.parseFile | [src] |
Read and parse a file.
func TweakFile.registerFolder | [src] |
Register a new structure to be parsed.
func File.delete | [src] |
Delete the specified file.
func File.duplicate | [src] |
Duplicate a file.
func File.exists | [src] |
Returns true if the given file exists.
func File.getAttributes | [src] |
Returns attributes associated to the given filename.
func File.getFileInfo | [src] |
Get informations about a file.
func File.getInfo | [src] |
Returns various file informations.
func File.open | [src] |
Open a new file stream.
func File.openRead | [src] |
Creates a new file stream for reading.
func File.openWrite | [src] |
Creates a new file stream for writing.
func File.readAllBytes | [src] |
Read a file, and store the result in an array of bytes.
func File.readAllLines | [src] |
Read all the lines of a file.
func File.readAllText | [src] |
Read a file, and store the result in an utf8 string.
func File.readEachLines | [src] |
Call user code for each line.
func File.touch | [src] |
Change the file write date/time.
func File.writeAllBytes | [src] |
Write a file with the content of a slice of bytes.
Write a file with the content of a ConcatBuffer.
func File.writeAllLines | [src] |
Write a file with the content of an array of string, one per line.
namespace Core.Format |
append | Format a string and put the result in a ConcatBuffer. |
checkFormat | Check if this is a valid fmt/values pair, coherent with format specification. |
countPercent | Count the number of valid % placeholders in the string format. |
replaceString | Format a string in dest. |
toInterp(*ConcatBuffer, string) | String interpolation. |
toInterp(string) | String interpolation. |
toString | Format a string and returns the result as a String. |
toStringTemp | Returns a formatted string stored in the temporary allocator. |
func Format.append | [src] |
Format a string and put the result in a ConcatBuffer.
func Format.checkFormat | [src] |
Check if this is a valid fmt/values pair, coherent with format specification.
func Format.countPercent | [src] |
Count the number of valid % placeholders in the string format.
Note that %% will not be counted, as this represents the % character
func Format.replaceString | [src] |
Format a string in dest.
Can be a lot faster than the convenient version which returns a String.
func Format.toInterp | [src] |
String interpolation.
Format is {<value to interpolate>:format}
String interpolation.
func Format.toString | [src] |
Format a string and returns the result as a String.
Use % as a place holder for a value.
% can be followed by a format option between {}.
func Format.toStringTemp | [src] |
Returns a formatted string stored in the temporary allocator.
namespace Core.Globalization |
CultureInfo | |
NumberFormatInfo | Provides culture-specific information for formatting and parsing numeric values. |
getCultureInfo | Returns the global culture info structure. |
struct Globalization.CultureInfo | [src] |
numberFormat | Globalization.NumberFormatInfo |
struct Globalization.NumberFormatInfo | [src] |
Provides culture-specific information for formatting and parsing numeric values.
negativeSign | u8 | |
positiveSign | u8 | |
decimalSeparator | u8 |
func Globalization.getCultureInfo | [src] |
Returns the global culture info structure.
namespace Core.Hardware |
getMacAddress | Max address. |
getProcessorCount | Number of processors. |
func Hardware.getMacAddress | [src] |
Max address.
func Hardware.getProcessorCount | [src] |
Number of processors.
namespace Core.Hash |
Adler32 | |
City32 | |
Crc32 | |
Md5 | |
Sha256 |
hash32 | Hash the given value and returns the corresponding u32. |
jenkins(u32) | |
jenkins(u64) | |
murmur3(u32) | |
murmur3(u32, u32) | |
murmur3(u64) | |
murmur3(u64, u64) |
struct Hash.Adler32 | [src] |
adler | u32 |
compute | Returns the adler32 hash value for the given buffer. |
init | Initialize the hashing sequence. |
update | Update the hash value with buffer content. |
func Adler32.compute | [src] |
Returns the adler32 hash value for the given buffer.
func Adler32.init | [src] |
Initialize the hashing sequence.
func Adler32.update | [src] |
Update the hash value with buffer content.
struct Hash.City32 | [src] |
crc | u32 |
compute | Returns the hash value for the given buffer. |
init | Initialize the hashing sequence. |
update | Update the hash value with buffer content. |
func City32.compute | [src] |
Returns the hash value for the given buffer.
func City32.init | [src] |
Initialize the hashing sequence.
func City32.update | [src] |
Update the hash value with buffer content.
struct Hash.Crc32 | [src] |
crc | u32 |
compute | Returns the hash value for the given buffer. |
init | Initialize the hashing sequence. |
update | Update the hash value with buffer content. |
func Crc32.compute | [src] |
Returns the hash value for the given buffer.
func Crc32.init | [src] |
Initialize the hashing sequence.
func Crc32.update | [src] |
Update the hash value with buffer content.
interface Hash.IHash32 | [src] |
compute | func(const *Hash.IHash32)->u32 |
struct Hash.Md5 | [src] |
padding | [64] u8 | |
state | [4] u32 | |
count | [2] u32 | |
buffer | [64] u8 |
compute | Returns the md5 value for the given buffer. |
final | Finalize the computation. |
init | Initialize the hashing sequence. |
toString | Convert a MD5 result to a string. |
update | Update the hash value with buffer content. |
func Md5.compute | [src] |
Returns the md5 value for the given buffer.
func Md5.final | [src] |
Finalize the computation.
func Md5.init | [src] |
Initialize the hashing sequence.
func Md5.toString | [src] |
Convert a MD5 result to a string.
func Md5.update | [src] |
Update the hash value with buffer content.
struct Hash.Sha256 | [src] |
data | [64] u8 | |
state | [8] u32 | |
datalen | u32 | |
bitlen | u64 |
compute | Returns the sha256 value for the given buffer. |
final | Finalize the computation. |
init | Initialize the hashing sequence. |
update | Update the hash value with buffer content. |
func Sha256.compute | [src] |
Returns the sha256 value for the given buffer.
func Sha256.final | [src] |
Finalize the computation.
func Sha256.init | [src] |
Initialize the hashing sequence.
func Sha256.update | [src] |
Update the hash value with buffer content.
func Hash.hash32 | [src] |
Hash the given value and returns the corresponding u32.
func Hash.jenkins | [src] |
func Hash.murmur3 | [src] |
struct Core.HashSet | [src] |
A set of unique values.
HASH_FREE | s32 | |
HASH_DELETED | s32 | |
HASH_FIRST | s32 | |
HASH_MASK | s32 | |
allocator | Swag.IAllocator | |
table | ^HashSetEntry'(Core.HashSetEntry.K) | |
count | u64 | Number of valid entries. |
capacity | u64 | Number of total entries the table can hold. |
deleted | u64 | Number of deleted entries. |
add(self, &&K) | Add a new element. |
add(self, K) | Add a new element. |
clear | Remove all elements. |
contains | Returns true if the table contains the given element. |
emplaceInternal | Add a new element. |
free | Free the hashset content. |
getNewIndex | |
grow | |
hashKey | |
remove | Remove the given element if it exists. |
reserve | Reserve newCapacity elements in the set. |
opAffect | |
opCount | |
opDrop | |
opPostCopy | |
opVisit |
func IConvert.convert | [src] |
func HashSet.add | [src] |
Add a new element.
func HashSet.clear | [src] |
Remove all elements.
func HashSet.contains | [src] |
Returns true if the table contains the given element.
func HashSet.emplaceInternal | [src] |
Add a new element.
func HashSet.free | [src] |
Free the hashset content.
func HashSet.getNewIndex | [src] |
func HashSet.grow | [src] |
func HashSet.hashKey | [src] |
func HashSet.opAffect | [src] |
func HashSet.opCount | [src] |
func HashSet.opDrop | [src] |
func HashSet.opPostCopy | [src] |
func HashSet.opVisit | [src] |
func HashSet.remove | [src] |
Remove the given element if it exists.
func HashSet.reserve | [src] |
Reserve newCapacity elements in the set.
struct Core.HashSetEntry | [src] |
hash | u32 | |
key | HashSetEntry.K |
struct Core.HashTable | [src] |
Map a key to a value.
HASH_FREE | s32 | |
HASH_DELETED | s32 | |
HASH_FIRST | s32 | |
HASH_MASK | s32 | |
allocator | Swag.IAllocator | |
table | ^HashTableEntry'(Core.HashTableEntry.K, Core.HashTableEntry.V) | |
count | u64 | Number of valid entries. |
capacity | u64 | Number of total entries the table can hold. |
deleted | u64 | Number of deleted entries. |
add(self, K, &&V, bool) | Add a new key value pair. |
add(self, K, V, bool) | Add a new key value pair. |
clear | Remove all elements. |
contains | Returns true if the table contains the given key. |
emplaceInternal | Use with care !. |
find | Find the given key, and returns the corresponding entry. |
findOrAdd | Get the entry if it exists, or creates a new one with a default value. |
free | Free the hashtable content. |
get | Find the given key, and returns the corresponding value. |
getNewIndex | |
grow | |
hashKey | |
remove | Remove the given key if it exists. |
reserve | Reserve newCapacity elements in the table. |
opAffect | |
opCount | |
opDrop | |
opIndex(self, K) | |
opIndex(self, K) | |
opIndexAffect | |
opPostCopy | |
opVisit | alias0 is the key, and alias1 is the value. |
func IConvert.convert | [src] |
func HashTable.add | [src] |
Add a new key value pair.
If the key already exists, then the value will be replaced if updateValue is true.
Add a new key value pair.
If the key already exists, then the value will be replaced if updateValue is true.
func HashTable.clear | [src] |
Remove all elements.
func HashTable.contains | [src] |
Returns true if the table contains the given key.
func HashTable.emplaceInternal | [src] |
Use with care !.
func HashTable.find | [src] |
Find the given key, and returns the corresponding entry.
Returns null if the key is not there.
func HashTable.findOrAdd | [src] |
Get the entry if it exists, or creates a new one with a default value.
func HashTable.free | [src] |
Free the hashtable content.
func HashTable.get | [src] |
Find the given key, and returns the corresponding value.
If the key does not exist, then it will return val instead
func HashTable.getNewIndex | [src] |
func HashTable.grow | [src] |
func HashTable.hashKey | [src] |
func HashTable.opAffect | [src] |
func HashTable.opCount | [src] |
func HashTable.opDrop | [src] |
func HashTable.opIndex | [src] |
func HashTable.opIndexAffect | [src] |
func HashTable.opPostCopy | [src] |
func HashTable.opVisit | [src] |
alias0 is the key, and alias1 is the value.
func HashTable.remove | [src] |
Remove the given key if it exists.
func HashTable.reserve | [src] |
Reserve newCapacity elements in the table.
struct Core.HashTableEntry | [src] |
hash | u32 | |
key | HashTableEntry.K | |
value | HashTableEntry.V |
interface Core.ILogWriter | [src] |
func(*ILogWriter, string) |
namespace Core.Input |
GamePad | Represents a gamepad. |
GamePadState | Represents specific information about the state of the controller, including the current state of buttons and sticks. |
Keyboard | Allows getting keystrokes from keyboard. |
KeyboardState | Represents one keyboard state. |
KeyboardStateNative | |
Mouse | Allows reading position and button click information from mouse. |
MouseState | Represents one mouse state. |
GamePadButton | Enumerates gamepad buttons. |
Key | Defines the keys on a keyboard. |
KeyModifiers | |
MouseButton |
getKeyName | Returns a "shortcut" display name. |
getMousePos | Returns the current mouse position. |
setMousePos | Set the current mouse position. |
showMouseCursor | Shoud or hide the mouse cursor. |
struct Input.GamePad | [src] |
Represents a gamepad.
previousState | Input.GamePadState | |
currentState | Input.GamePadState | |
padIndex | u32 | |
connected | bool |
clear | Reset the previous and current state. |
getPosition | Get the analog position of the given button. |
isButtonJustPressed | Determines whether specified input device button has just been pressed. |
isButtonJustReleased | Determines whether specified input device button has just been released. |
isButtonPressed | Determines whether specified input device button is pressed. |
isButtonReleased | Determines whether specified input device button is released (not pressed). |
isConnected | Returns true if the corresponding padIndex is connected. |
setVibration(self, f32, f32) | Set the vibration motor speeds. |
setVibration(u32, f32, f32) | Set the left and right vibration of the given padIndex. |
update | Update the GamePad current state. |
func GamePad.clear | [src] |
Reset the previous and current state.
func GamePad.getPosition | [src] |
Get the analog position of the given button.
func GamePad.isButtonJustPressed | [src] |
Determines whether specified input device button has just been pressed.
func GamePad.isButtonJustReleased | [src] |
Determines whether specified input device button has just been released.
func GamePad.isButtonPressed | [src] |
Determines whether specified input device button is pressed.
func GamePad.isButtonReleased | [src] |
Determines whether specified input device button is released (not pressed).
func GamePad.isConnected | [src] |
Returns true if the corresponding padIndex is connected.
func GamePad.setVibration | [src] |
Set the left and right vibration of the given padIndex.
Set the vibration motor speeds.
func GamePad.update | [src] |
Update the GamePad current state.
enum Input.GamePadButton | [src] |
Enumerates gamepad buttons.
A | |
B | |
Back | |
BigButton | |
DPadDown | |
DPadLeft | |
DPadRight | |
DPadUp | |
LeftShoulder | |
LeftStick | |
LeftThumbstickDown | |
LeftThumbstickLeft | |
LeftThumbstickRight | |
LeftThumbstickUp | |
LeftTrigger | |
RightShoulder | |
RightStick | |
RightThumbstickDown | |
RightThumbstickLeft | |
RightThumbstickRight | |
RightThumbstickUp | |
RightTrigger | |
Start | |
X | |
Y |
struct Input.GamePadState | [src] |
Represents specific information about the state of the controller, including the current state of buttons and sticks.
pressed | [25] bool | |
position | [25] Math.Point |
clear | Reset state to its default value. |
update | Compute the current state of the given pad index. |
func GamePadState.clear | [src] |
Reset state to its default value.
func GamePadState.update | [src] |
Compute the current state of the given pad index.
enum Input.Key | [src] |
Defines the keys on a keyboard.
None | |
A | |
Add | |
Apps | |
Attn | |
B | |
Back | |
BrowserBack | |
BrowserFavorites | |
BrowserForward | |
BrowserHome | |
BrowserRefresh | |
BrowserSearch | |
BrowserStop | |
C | |
Cancel | |
Capital | |
CapsLock | |
Clear | |
Control | |
Crsel | |
D | |
D0 | |
D1 | |
D2 | |
D3 | |
D4 | |
D5 | |
D6 | |
D7 | |
D8 | |
D9 | |
Decimal | |
Delete | |
Divide | |
Down | |
E | |
End | |
Enter | |
EraseEof | |
Escape | |
Execute | |
Exsel | |
F | |
F1 | |
F10 | |
F11 | |
F12 | |
F13 | |
F14 | |
F15 | |
F16 | |
F17 | |
F18 | |
F19 | |
F2 | |
F20 | |
F21 | |
F22 | |
F23 | |
F24 | |
F3 | |
F4 | |
F5 | |
F6 | |
F7 | |
F8 | |
F9 | |
FinalMode | |
G | |
H | |
HanguelMode | |
HangulMode | |
HanjaMode | |
Help | |
Home | |
I | |
IMEAccept | |
IMEAceept | |
IMEConvert | |
IMEModeChange | |
IMENonConvert | |
Insert | |
J | |
JunjaMode | |
K | |
KanaMode | |
KanjiMode | |
L | |
LButton | |
LControl | |
LMenu | |
LShift | |
LWin | |
LaunchApplication1 | |
LaunchApplication2 | |
LaunchMail | |
Left | |
LineFeed | |
M | |
MButton | |
MediaNextTrack | |
MediaPlayPause | |
MediaPreviousTrack | |
MediaStop | |
MenuCtrl | |
Multiply | |
N | |
Next | |
NoName | |
NumLock | |
NumPad0 | |
NumPad1 | |
NumPad2 | |
NumPad3 | |
NumPad4 | |
NumPad5 | |
NumPad6 | |
NumPad7 | |
NumPad8 | |
NumPad9 | |
O | |
Oem1 | |
Oem102 | |
Oem2 | |
Oem3 | |
Oem4 | |
Oem5 | |
Oem6 | |
Oem7 | |
Oem8 | |
OemBackslash | |
OemClear | |
OemCloseBrackets | |
OemComma | |
OemMinus | |
OemOpenBrackets | |
OemPeriod | |
OemPipe | |
OemPlus | |
OemQuestion | |
OemQuotes | |
OemSemicolon | |
OemTilde | |
P | |
Pa1 | |
Packet | |
PageDown | |
PageUp | |
Pause | |
Play | |
PrintScreen | |
Prior | |
Process | |
Q | |
R | |
RButton | |
RControl | |
RMenu | |
RShift | |
RWin | |
Return | |
Right | |
S | |
Scroll | |
Select | |
SelectMedia | |
Separator | |
Shift | |
Sleep | |
Space | |
Subtract | |
T | |
Tab | |
U | |
Up | |
V | |
VolumeDown | |
VolumeMute | |
VolumeUp | |
W | |
X | |
XButton1 | |
XButton2 | |
Y | |
Z | |
Zoom |
enum Input.KeyModifiers | [src] |
Zero | |
Shift | |
Control | |
Alt | |
CtrlShift | |
CtrlAlt |
struct Input.Keyboard | [src] |
Allows getting keystrokes from keyboard.
previousState | Input.KeyboardState | |
currentState | Input.KeyboardState | |
pressedRepeat | [188] bool | |
pressedTime | [188] u32 | |
pressedRepeatStartTimeMs | u32 | |
pressedRepeatTimeMs | u32 | |
canRepeat | bool |
clear | Reset the keyboard state. |
getPressedModifiers | Returns the currently pressed key modifiers. |
isKeyJustPressed | Determines whether given key has just been pressed. |
isKeyJustReleased | Determines whether given key has just been released. |
isKeyPressed(self, Key) | Determines whether given key is currently being pressed. |
isKeyPressed(Key) | Returns true if the given key is pressed. |
isKeyReleased | Determines whether given key is currently being released. |
keyToRune | Try to transform the given key to the corresponding rune. |
keyToVirtualKey | |
update | Compute current state of the keyboard (all keys). |
virtualKeyToKey |
func Keyboard.clear | [src] |
Reset the keyboard state.
func Keyboard.getPressedModifiers | [src] |
Returns the currently pressed key modifiers.
func Keyboard.isKeyJustPressed | [src] |
Determines whether given key has just been pressed.
func Keyboard.isKeyJustReleased | [src] |
Determines whether given key has just been released.
func Keyboard.isKeyPressed | [src] |
Determines whether given key is currently being pressed.
Returns true if the given key is pressed.
func Keyboard.isKeyReleased | [src] |
Determines whether given key is currently being released.
func Keyboard.keyToRune | [src] |
Try to transform the given key to the corresponding rune.
func Keyboard.keyToVirtualKey | [src] |
func Keyboard.update | [src] |
Compute current state of the keyboard (all keys).
func Keyboard.virtualKeyToKey | [src] |
struct Input.KeyboardState | [src] |
Represents one keyboard state.
using native | Input.KeyboardStateNative | |
pressed | [188] bool |
clear | Reset keyboard state. |
update | Compute current keyboard state. |
func KeyboardState.clear | [src] |
Reset keyboard state.
func KeyboardState.update | [src] |
Compute current keyboard state.
struct Input.KeyboardStateNative | [src] |
nativeState | [256] Win32.BYTE |
struct Input.Mouse | [src] |
Allows reading position and button click information from mouse.
previousState | Input.MouseState | |
currentState | Input.MouseState | |
dblClk | [5] bool | |
dblClkTimeMs | u32 |
clear | Reset the mouse state to its default value. |
getMove | Returns the move between the current position and the previous one. |
getPosition | Returns the mouse position. |
getPreviousPos | Returns the previous mouse position, before the last update. |
isButtonDoubleClick | |
isButtonJustPressed | Determines whether the specified mouse button has just been pressed. |
isButtonJustReleased | Determines whether the specified mouse button has just been released. |
isButtonPressed(self, MouseButton) | Determines whether the specified mouse button is pressed. |
isButtonPressed(MouseButton) | Determins if one given mouse button is pressed or not. |
isButtonReleased | Determines whether the specified mouse button is released. |
update | Compute the current state of the mouse. |
func Mouse.clear | [src] |
Reset the mouse state to its default value.
func Mouse.getMove | [src] |
Returns the move between the current position and the previous one.
func Mouse.getPosition | [src] |
Returns the mouse position.
func Mouse.getPreviousPos | [src] |
Returns the previous mouse position, before the last update.
func Mouse.isButtonDoubleClick | [src] |
func Mouse.isButtonJustPressed | [src] |
Determines whether the specified mouse button has just been pressed.
func Mouse.isButtonJustReleased | [src] |
Determines whether the specified mouse button has just been released.
func Mouse.isButtonPressed | [src] |
Determins if one given mouse button is pressed or not.
Determines whether the specified mouse button is pressed.
func Mouse.isButtonReleased | [src] |
Determines whether the specified mouse button is released.
func Mouse.update | [src] |
Compute the current state of the mouse.
enum Input.MouseButton | [src] |
Left | |
Middle | |
Right | |
XButton1 | |
XButton2 |
struct Input.MouseState | [src] |
Represents one mouse state.
pressed | [5] bool | |
pressedTime | [5] u32 | |
pressedPos | [5] Math.Point | |
position | Math.Point |
clear | Reset the state to its default value. |
update | Compute the actual state of the mouse. |
func MouseState.clear | [src] |
Reset the state to its default value.
func MouseState.update | [src] |
Compute the actual state of the mouse.
func Input.getKeyName | [src] |
Returns a "shortcut" display name.
func Input.getMousePos | [src] |
Returns the current mouse position.
func Input.setMousePos | [src] |
Set the current mouse position.
func Input.showMouseCursor | [src] |
Shoud or hide the mouse cursor.
namespace Core.Jobs |
ForJob | |
Job | |
SliceJob |
JobState |
getNumWorkers | Returns number of threads in the job system. |
isSynchrone | Returns true is the job system has been initialized. |
parallelFor | Do a for for in parallel chunks. |
parallelVisit | Operate on a range in parallel chunks. |
scheduleJob | Schedule a job to execute. |
setNumWorkers | Set the number of worker threads. Must be done once. |
waitDone | Wait for all registered jobs to be finished. |
waitJob | Wait for a given job to be finished. |
struct Jobs.ForJob | [src] |
using base | Jobs.Job | |
startIndex | u32 | |
endIndex | u32 | |
userData | *void |
struct Jobs.Job | [src] |
lambda | func(*void) | |
data | *void | |
state | Jobs.JobState | |
pendingIndex | u32 |
enum Jobs.JobState | [src] |
Zero | |
InPending | |
Done |
struct Jobs.SliceJob | [src] |
using base | Jobs.Job | |
buffer | [..] Jobs.SliceJob.T | |
offset | u32 | |
userData | *void |
func Jobs.getNumWorkers | [src] |
Returns number of threads in the job system.
func Jobs.isSynchrone | [src] |
Returns true is the job system has been initialized.
func Jobs.parallelFor | [src] |
Do a for for in parallel chunks.
Exposed variables: - #alias0: current for index - #alias1: userData as passed to the macro
func Jobs.parallelVisit | [src] |
Operate on a range in parallel chunks.
Exposed variables: - buffer: address of the element of the range to process - data: userData as passed to the macro
func Jobs.scheduleJob | [src] |
Schedule a job to execute.
func Jobs.setNumWorkers | [src] |
Set the number of worker threads. Must be done once.
func Jobs.waitDone | [src] |
Wait for all registered jobs to be finished.
func Jobs.waitJob | [src] |
Wait for a given job to be finished.
namespace Core.Latin1 |
CharAttribute |
compare | Compare two utf8 strings, dealing only with latin1 table Returns -1, 0 or 1. |
compareNatural | Compare two utf8 strings in a natural way, dealing only with latin1 table Returns -1, 0 or 1. |
isAscii | |
isBinDigit | |
isControl | |
isDigit | |
isHexDigit | |
isLetter | |
isLetterOrDigit | |
isLower | |
isNumber | |
isPunctuation | |
isSpace | |
isSymbol | |
isUpper | |
isWord | |
makeLower | Make an utf8 buffer lower case, dealing only with latin1 table. |
makeUpper | Make an utf8 buffer upper case, dealing only with latin1 table. |
toLower | |
toUpper | |
trim | Trim the string. |
enum Latin1.CharAttribute | [src] |
Zero | |
Control | |
Punctuation | |
BinDigit | |
HexDigit | |
Digit | |
Symbol | |
Spacing | |
Upper | |
Lower | |
Printable | |
LowerUtf8 | |
UpperUtf8 | |
Graphical | |
Letter |
func Latin1.compare | [src] |
Compare two utf8 strings, dealing only with latin1 table Returns -1, 0 or 1.
func Latin1.compareNatural | [src] |
Compare two utf8 strings in a natural way, dealing only with latin1 table Returns -1, 0 or 1.
:LICENCE This code is based on natsort by Martin Pool (https://github.com/sourcefrog/natsort) The original code has been modified for Swag See LICENCE.md for the corresponding licence.
func Latin1.isAscii | [src] |
func Latin1.isBinDigit | [src] |
func Latin1.isControl | [src] |
func Latin1.isDigit | [src] |
func Latin1.isHexDigit | [src] |
func Latin1.isLetter | [src] |
func Latin1.isLetterOrDigit | [src] |
func Latin1.isLower | [src] |
func Latin1.isNumber | [src] |
func Latin1.isPunctuation | [src] |
func Latin1.isSpace | [src] |
func Latin1.isSymbol | [src] |
func Latin1.isUpper | [src] |
func Latin1.isWord | [src] |
func Latin1.makeLower | [src] |
Make an utf8 buffer lower case, dealing only with latin1 table.
func Latin1.makeUpper | [src] |
Make an utf8 buffer upper case, dealing only with latin1 table.
func Latin1.toLower | [src] |
func Latin1.toUpper | [src] |
func Latin1.trim | [src] |
Trim the string.
struct Core.List | [src] |
head | *ListNode'(Core.ListNode.T) | |
tail | *ListNode'(Core.ListNode.T) | |
count | u64 |
addBack(self, &&T) | Add a new element on front. |
addBack(self, T) | Add a new element on front. |
addFront(self, &&T) | Add a new element on front. |
addFront(self, T) | Add a new element on front. |
clear | Clear all elements. |
insertAfter(self, *ListNode'(T), &&T) | |
insertAfter(self, *ListNode'(T), T) | Insert a node before the reference. |
insertBefore(self, *ListNode'(T), &&T) | |
insertBefore(self, *ListNode'(T), T) | Insert a node before the reference. |
opDrop | |
opVisit | Visit every elements of the list. |
func List.addBack | [src] |
Add a new element on front.
func List.addFront | [src] |
Add a new element on front.
func List.clear | [src] |
Clear all elements.
func List.insertAfter | [src] |
Insert a node before the reference.
func List.insertBefore | [src] |
Insert a node before the reference.
func List.opDrop | [src] |
func List.opVisit | [src] |
Visit every elements of the list.
Visiting by pointer and in reverse order is supported
struct Core.ListNode | [src] |
prev | *ListNode'(Core.ListNode.T) | |
next | *ListNode'(Core.ListNode.T) | |
value | ListNode.T |
struct Core.Log | [src] |
lock | Sync.Mutex | |
buf | StrConv.StringBuilder | |
dt | Time.DateTime | |
writers | Array'(Core.ILogWriter) | |
prefix | string | |
flags | LogFlags |
addWriter | Register a new writer interface. |
clearWriters | Remove all writers. |
create | Create a new log. |
getFlags | Get the logger prefix. |
getPrefix | Get the logger prefix. |
Main print function. | |
setFlags | Set the logger flags. |
setPrefix | Set the logger prefix. |
func Log.addWriter | [src] |
Register a new writer interface.
func Log.clearWriters | [src] |
Remove all writers.
func Log.create | [src] |
Create a new log.
func Log.getFlags | [src] |
Get the logger prefix.
func Log.getPrefix | [src] |
Get the logger prefix.
func Log.print | [src] |
Main print function.
func Log.setFlags | [src] |
Set the logger flags.
func Log.setPrefix | [src] |
Set the logger prefix.
enum Core.LogFlags | [src] |
Zero | |
Prefix | |
Date | |
Time | |
ShortFileName | Exclusive with LongFileName. |
LongFileName | |
Line | Exclusive with FullLoc. |
FullLoc | |
Default |
namespace Core.Math |
Angle | |
Const | |
Int128 | |
Matrix3x3 | |
Matrix4x4 | |
NumericArray | |
Point | A simple Point with 2 coordinates X and Y. |
Rectangle | A simple rectangle with 4 coordinates. |
Transform2 | |
Variant | |
Vector2 | |
Vector3 | |
Vector4 |
abs(f32) | |
abs(f64) | |
abs(s16) | |
abs(s32) | |
abs(s64) | |
abs(s8) | |
acos(f32) | |
acos(f64) | |
asin(f32) | |
asin(f64) | |
atan(f32) | |
atan(f64) | |
atan2(f32, f32) | |
atan2(f64, f64) | |
bigEndianToNative | Convert a big endian integer to current arch native format. |
byteswap(u16) | Swap bytes. |
byteswap(u32) | |
byteswap(u64) | |
ceil(f32) | |
ceil(f64) | |
clamp | |
cos(f32) | |
cos(f64) | |
cosh(f32) | |
cosh(f64) | |
countOnes(u16) | |
countOnes(u32) | |
countOnes(u64) | |
countOnes(u8) | Returns the number of bits set to 1. |
cubicLerp(f32, f32, f32, f32, f32) | |
cubicLerp(f64, f64, f64, f64, f64) | |
exp(f32) | |
exp(f64) | |
exp2(f32) | |
exp2(f64) | |
floor(f32) | |
floor(f64) | |
gcd | Find the gcd between a and b. |
hasByte(u16, u8) | Determin if an integer has a given byte. |
hasByte(u32, u8) | |
hasByte(u64, u8) | |
hasZeroByte(u16) | Determin if any of the bytes is zero. |
hasZeroByte(u32) | |
hasZeroByte(u64) | |
interpHermite(f32) | |
interpHermite(f64) | |
interpQuintic(f32) | |
interpQuintic(f64) | |
isEqualEpsilon(f32, f32, f32) | |
isEqualEpsilon(f64, f64, f64) | |
isNan(f32) | |
isNan(f64) | |
isPowerOf2(u16) | |
isPowerOf2(u32) | |
isPowerOf2(u64) | |
isPowerOf2(u8) | |
isZeroEpsilon(f32, f32) | |
isZeroEpsilon(f64, f64) | |
lcm | Find the Least Common Multiple between a and b. |
leadingZeros(u16) | |
leadingZeros(u32) | |
leadingZeros(u64) | |
leadingZeros(u8) | Returns the number of bits set to 0 from the left. |
lerp(f32, f32, f32) | |
lerp(f64, f64, f64) | |
littleEndianToNative | Convert a little endian integer to current arch native format. |
log(f32) | |
log(f64) | |
log10(f32) | |
log10(f64) | |
log2(f32) | |
log2(f64) | |
make64 | Make a 64 bits with two 32 bits. |
makeRepeat16 | Make a 16 bits by repeating a given byte 0x20 => 0x2020. |
makeRepeat32 | Make a 32 bits by repeating a given byte 0x20 => 0x20202020. |
makeRepeat64 | Make a 64 bits by repeating a given byte 0x20 => 0x20202020_20202020. |
map(f32, f32, f32, f32, f32) | |
map(f64, f64, f64, f64, f64) | |
max(T, T) | |
max(T, T, T) | |
max(T, T, T, T) | |
max(s16, s16) | |
max(s32, s32) | |
max(s64, s64) | |
max(s8, s8) | |
max(u16, u16) | |
max(u32, u32) | |
max(u64, u64) | |
max(u8, u8) | |
min(T, T) | |
min(T, T, T) | |
min(T, T, T, T) | |
min(s16, s16) | |
min(s32, s32) | |
min(s64, s64) | |
min(s8, s8) | |
min(u16, u16) | |
min(u32, u32) | |
min(u64, u64) | |
min(u8, u8) | |
mulAdd(f32, f32, f32) | |
mulAdd(f64, f64, f64) | |
mulU64 | |
nativeToBigEndian | Convert a native arch integer to a big endian. |
pow(f32, f32) | |
pow(f64, f64) | |
reverse(u16) | |
reverse(u32) | |
reverse(u64) | |
reverse(u8) | Reverse all bits. |
rol(u16, u16) | |
rol(u32, u32) | |
rol(u64, u64) | |
rol(u8, u8) | Rotate bits left. |
ror(u16, u16) | |
ror(u32, u32) | |
ror(u64, u64) | |
ror(u8, u8) | Rotate bits right. |
round(f32) | |
round(f64) | |
roundDownToPowerOf2(u32) | |
roundDownToPowerOf2(u64) | |
roundUpToPowerOf2(u32) | |
roundUpToPowerOf2(u64) | |
saturate(f32) | |
saturate(f64) | |
sign(f32) | |
sign(f64) | |
sign(s16) | |
sign(s32) | |
sign(s64) | |
sign(s8) | |
sin(f32) | |
sin(f64) | |
sinh(f32) | |
sinh(f64) | |
smoothstep(f32, f32, f32) | |
smoothstep(f64, f64, f64) | |
sqrt(f32) | |
sqrt(f64) | |
tan(f32) | |
tan(f64) | |
tanh(f32) | |
tanh(f64) | |
toDegrees(f32) | |
toDegrees(f64) | |
toRadians(f32) | |
toRadians(f64) | |
trailingZeros(u16) | |
trailingZeros(u32) | |
trailingZeros(u64) | |
trailingZeros(u8) | Returns the number of bits set to 0 from the right. |
trunc(f32) | |
trunc(f64) |
struct Math.Angle | [src] |
rad | f32 |
toDegrees |
opAffect | |
opAffectLiteral |
func Angle.opAffect | [src] |
func Angle.opAffectLiteral | [src] |
func Angle.toDegrees | [src] |
struct Math.Const | [src] |
Pi | Math.Const.T | |
E | Math.Const.T | |
TwoPi | Math.Const.T | |
PiBy2 | Math.Const.T | |
PiBy3 | Math.Const.T | |
PiBy4 | Math.Const.T | |
PiBy6 | Math.Const.T | |
PiBy8 | Math.Const.T | |
ThreePiBy4 | Math.Const.T | |
OneByPi | Math.Const.T | |
TwoByPi | Math.Const.T | |
Sqrt2 | Math.Const.T | |
OneBySqrt2 | Math.Const.T | |
Ln2 | Math.Const.T | |
Ln10 | Math.Const.T | |
Log2E | Math.Const.T | |
Log10E | Math.Const.T | |
Epsilon | Math.Const.T |
struct Math.Int128 | [src] |
lo | u64 | |
hi | s64 |
mul |
opCast | |
opCmp |
func Int128.mul | [src] |
func Int128.opCast | [src] |
func Int128.opCmp | [src] |
struct Math.Matrix3x3 | [src] |
m | [3,3] f32 |
setIdentity |
func Matrix3x3.setIdentity | [src] |
struct Math.Matrix4x4 | [src] |
m | [4,4] f32 |
setIdentity |
func Matrix4x4.setIdentity | [src] |
struct Math.NumericArray | [src] |
buf | [?] Math.NumericArray.T |
from | |
mulAdd(self, NumericArray'(T, N), NumericArray'(T, N)) | Multiply & Add. |
mulAdd(self, T, T) | Multiply & add. |
set | Set all values. |
opAffect(self, T) | |
opAffect(self, const [..] T) | |
opAssign(self, NumericArray'(T, N)) | |
opAssign(self, T) | |
opBinary | |
opEquals | |
opIndex |
func NumericArray.from | [src] |
func NumericArray.mulAdd | [src] |
Multiply & add.
Multiply & Add.
func NumericArray.opAffect | [src] |
func NumericArray.opAssign | [src] |
func NumericArray.opBinary | [src] |
func NumericArray.opEquals | [src] |
func NumericArray.opIndex | [src] |
func NumericArray.set | [src] |
Set all values.
struct Math.Point | [src] |
A simple Point with 2 coordinates X and Y.
x | f32 | |
y | f32 |
ceil | Perform a Math.ceil operation on all the coordinates. |
clear | Set Point to (0, 0). |
isEqualEpsilon | Check if two points are equal with an epsilon. |
isZero | Returns true if the Point is null. |
isZeroEpsilon | Check for zero with an epsilon. |
offset(self, f32) | Offset this Point by a given value. |
offset(self, f32, f32) | Offset this Point by a given value. |
round | Perform a Math.round operation on all the coordinates. |
trunc | Perform a Math.trunc operation on all the coordinates. |
opAffect | |
opAssign(self, const &Point) | |
opAssign(self, f32) | |
opBinary(self, const &Point) | |
opBinary(self, f32) | |
opUnary |
func Point.ceil | [src] |
Perform a Math.ceil operation on all the coordinates.
func Point.clear | [src] |
Set Point to (0, 0).
func Point.isEqualEpsilon | [src] |
Check if two points are equal with an epsilon.
func Point.isZero | [src] |
Returns true if the Point is null.
func Point.isZeroEpsilon | [src] |
Check for zero with an epsilon.
func Point.offset | [src] |
Offset this Point by a given value.
func Point.opAffect | [src] |
func Point.opAssign | [src] |
func Point.opBinary | [src] |
func Point.opUnary | [src] |
func Point.round | [src] |
Perform a Math.round operation on all the coordinates.
func Point.trunc | [src] |
Perform a Math.trunc operation on all the coordinates.
struct Math.Rectangle | [src] |
A simple rectangle with 4 coordinates.
x | f32 | Left position. |
y | f32 | Top position. |
width | f32 | Rectangle width. |
height | f32 | Rectangle height. |
applyPadding | Add a padding (offset to each side). |
bottom | Bottom coordinate (y + height). |
ceil | Perform a Math.ceil operation on all the coordinates. |
center | Central point. |
clear | Set rectangle to (0, 0, 0, 0). |
constrainIn | Constrain the rectangle to be inside another one, without changing its size (so the other rectangle must be bigger). |
contains(self, const &Point) | Determines if the specfied point is contained within the rectangular region. |
contains(self, const &Rectangle) | Determines if the specfied rectangle is contained within the rectangular region. |
contains(self, f32, f32) | Determines if the specfied point is contained within the rectangular region. |
getUnion | Creates a rectangle that represents the union between a and b. |
horzCenter | Horizontal center coordinate (x + width / 2). |
inflate(self, f32) | Inflates the rectangle by the given value. |
inflate(self, f32, f32) | Inflates the rectangle by the given amount in x and y directions. |
intersect(self, const &Rectangle) | Intersect this rectangle with another one. |
intersect(const &Rectangle, const &Rectangle) | Creates a rectangle that represents the intersetion between a and b. |
intersectWith | Determines if this rectangle intersets with rect. |
isEmpty | Returns true if this instance has a surface of zero (width or height are null). |
isEmptyEpsilon | Returns true if this instance has a surface of zero (width and height are null). |
isNormalized | Returns true if this instance has a positive or null surface (width and height greater or equal than zero). |
isZero | Returns true if this instance is null. |
isZeroEpsilon | Returns true if this instance is null with an epsilon. |
moveBottom | Move the left coordinate, reducing the width. |
moveLeft | Move the left coordinate, reducing the width. |
moveRight | Move the left coordinate, reducing the width. |
moveTop | Move the left coordinate, reducing the width. |
offset(self, const &Point) | Offset the rectangle position by a given value. |
offset(self, f32) | Offset the rectangle position by a given value. |
offset(self, f32, f32) | Offset the rectangle position by a x and y values. |
right | Right coordinate (x + width). |
round | Perform a Math.round operation on all the coordinates. |
scale(self, f32) | Multiply the width and height of the rectangle by a given value. |
scale(self, f32, f32) | Multiply the width by x and the height by y. |
set | Initialize the rectangle with two position. |
setBottom | Bottom coordinate (y + height). |
setRight | Right coordinate (x + width). |
setUnion | Creates a rectangle that represents the union. |
trunc | Perform a Math.trunc operation on all the coordinates. |
vertCenter | Vertical center coordinate (y + height / 2). |
opEquals |
func Rectangle.applyPadding | [src] |
Add a padding (offset to each side).
func Rectangle.bottom | [src] |
Bottom coordinate (y + height).
func Rectangle.ceil | [src] |
Perform a Math.ceil operation on all the coordinates.
func Rectangle.center | [src] |
Central point.
func Rectangle.clear | [src] |
Set rectangle to (0, 0, 0, 0).
func Rectangle.constrainIn | [src] |
Constrain the rectangle to be inside another one, without changing its size (so the other rectangle must be bigger).
func Rectangle.contains | [src] |
Determines if the specfied point is contained within the rectangular region.
Determines if the specfied rectangle is contained within the rectangular region.
func Rectangle.getUnion | [src] |
Creates a rectangle that represents the union between a and b.
func Rectangle.horzCenter | [src] |
Horizontal center coordinate (x + width / 2).
func Rectangle.inflate | [src] |
Inflates the rectangle by the given value.
Inflates the rectangle by the given amount in x and y directions.
func Rectangle.intersect | [src] |
Intersect this rectangle with another one.
Creates a rectangle that represents the intersetion between a and b.
If there is no intersection, Zero is returned.
func Rectangle.intersectWith | [src] |
Determines if this rectangle intersets with rect.
func Rectangle.isEmpty | [src] |
Returns true if this instance has a surface of zero (width or height are null).
func Rectangle.isEmptyEpsilon | [src] |
Returns true if this instance has a surface of zero (width and height are null).
func Rectangle.isNormalized | [src] |
Returns true if this instance has a positive or null surface (width and height greater or equal than zero).
func Rectangle.isZero | [src] |
Returns true if this instance is null.
func Rectangle.isZeroEpsilon | [src] |
Returns true if this instance is null with an epsilon.
func Rectangle.moveBottom | [src] |
Move the left coordinate, reducing the width.
func Rectangle.moveLeft | [src] |
Move the left coordinate, reducing the width.
func Rectangle.moveRight | [src] |
Move the left coordinate, reducing the width.
func Rectangle.moveTop | [src] |
Move the left coordinate, reducing the width.
func Rectangle.offset | [src] |
Offset the rectangle position by a given value.
Offset the rectangle position by a x and y values.
Offset the rectangle position by a given value.
func Rectangle.opEquals | [src] |
func Rectangle.right | [src] |
Right coordinate (x + width).
func Rectangle.round | [src] |
Perform a Math.round operation on all the coordinates.
func Rectangle.scale | [src] |
Multiply the width and height of the rectangle by a given value.
Multiply the width by x and the height by y.
func Rectangle.set | [src] |
Initialize the rectangle with two position.
func Rectangle.setBottom | [src] |
Bottom coordinate (y + height).
func Rectangle.setRight | [src] |
Right coordinate (x + width).
func Rectangle.setUnion | [src] |
Creates a rectangle that represents the union.
func Rectangle.trunc | [src] |
Perform a Math.trunc operation on all the coordinates.
func Rectangle.vertCenter | [src] |
Vertical center coordinate (y + height / 2).
struct Math.Transform2 | [src] |
m11 | f32 | |
m12 | f32 | |
m21 | f32 | |
m22 | f32 | |
m31 | f32 | |
m32 | f32 | |
m | [2,2] f32 | |
tx | f32 | |
ty | f32 |
createRotation | Creates a rotation matix, with a given center of rotation. |
createScale | Creates a scale matix, with a given center. |
createTranslation | Creates a translation matix. |
multiply | Multiply two matricies. |
setIdentity | Set transform to identity. |
func Transform2.createRotation | [src] |
Creates a rotation matix, with a given center of rotation.
func Transform2.createScale | [src] |
Creates a scale matix, with a given center.
func Transform2.createTranslation | [src] |
Creates a translation matix.
func Transform2.multiply | [src] |
Multiply two matricies.
func Transform2.setIdentity | [src] |
Set transform to identity.
struct Math.Variant | [src] |
type | const *Swag.TypeInfo | |
buffer | [?] u8 | |
AllFlags | s32 |
checkValidType | |
drop | Drop the variant content (if necessary). |
get | Get the variant value of the given type Will assert if the current type does not match. |
set | Set the variant value. |
opAffect | |
opCmp | |
opDrop | |
opEquals | |
opPostCopy | |
opPostMove |
func Variant.checkValidType | [src] |
func Variant.drop | [src] |
Drop the variant content (if necessary).
func Variant.get | [src] |
Get the variant value of the given type Will assert if the current type does not match.
func Variant.opAffect | [src] |
func Variant.opCmp | [src] |
func Variant.opDrop | [src] |
func Variant.opEquals | [src] |
func Variant.opPostCopy | [src] |
func Variant.opPostMove | [src] |
func Variant.set | [src] |
Set the variant value.
struct Math.Vector2 | [src] |
x | f32 | |
y | f32 |
angle | Returns the angle with another vector. |
angle0To2Pi | Returns the angle with another vector in the range [0, 2Pi]. |
ceil | Math.ceil. |
clear | Set the vector to zero. |
cosAngle | Returns the cosine angle with another vector. |
cross(self, const &Vector2) | Returns the Z signed length of the perpendicular vector. |
cross(self, f32) | Returns the perpendicular vector in the 2D plane. |
distance | Returns the distance between two vectors. |
distanceSquared | Returns the square distance between two vectors. |
distanceToLine | Returns the distance of the point to the given line. |
distanceToSegment | Returns the distance of the point to the given segment. |
dot | Returns the dot product between two vectors. |
floor | Math.floor. |
isEqualEpsilon | Returns true if this vector is equals to another with an epsilon. |
isInEllipse | Returns true if the point pt is inside an ellipse. |
isInTriangle | Returns true if the point pt is inside the triangle defined with 'a, b, c'. |
isZero | Returns true if this vector is null. |
isZeroEpsilon | Returns true if this vector is null with an epsilon. |
length | Return sthe length of the vector. |
lengthSquared | Returns the squared length of the vector. |
lerp | Lerp one vector with another. |
lineLineIntersect | Compute the intersection point of two lines. |
max | Returns a vector which is the min of two vectors. |
min | Returns a vector which is the min of two vectors. |
nearestPointsSegSeg | Returns the minimal segment between two segments (and the minimal distance). |
negate | Negate the vector. |
normalize | Normalize this vector (set its length to 1). |
normalizeSafe | Normalize this vector (set its length to 1) even if its length is almost null. |
polyContains | Returns true if the given point is inside the polygon PNPoly by W. Randolph Franklin. |
rotate | Rotate the vector by a given angle. |
round | Math.round. |
segSegIntersect | Compute the intersection point of two segments. |
set | Set content. |
setLength | Set the vector length. |
setLengthSafe | Set the vector length. |
toNormalize | Returns this vector normalized. |
toNormalizeSafe | Returns this vector normalized even if its length is almost null. |
opAffect | |
opAssign(self, const &Vector2) | |
opAssign(self, f32) | |
opBinary(self, const &Vector2) | |
opBinary(self, f32) | |
opUnary |
func Vector2.angle | [src] |
Returns the angle with another vector.
func Vector2.angle0To2Pi | [src] |
Returns the angle with another vector in the range [0, 2Pi].
func Vector2.ceil | [src] |
Math.ceil.
func Vector2.clear | [src] |
Set the vector to zero.
func Vector2.cosAngle | [src] |
Returns the cosine angle with another vector.
func Vector2.cross | [src] |
Returns the perpendicular vector in the 2D plane.
axis will give the sign of the result
Returns the Z signed length of the perpendicular vector.
func Vector2.distance | [src] |
Returns the distance between two vectors.
func Vector2.distanceSquared | [src] |
Returns the square distance between two vectors.
func Vector2.distanceToLine | [src] |
Returns the distance of the point to the given line.
func Vector2.distanceToSegment | [src] |
Returns the distance of the point to the given segment.
func Vector2.dot | [src] |
Returns the dot product between two vectors.
func Vector2.floor | [src] |
Math.floor.
func Vector2.isEqualEpsilon | [src] |
Returns true if this vector is equals to another with an epsilon.
func Vector2.isInEllipse | [src] |
Returns true if the point pt is inside an ellipse.
func Vector2.isInTriangle | [src] |
Returns true if the point pt is inside the triangle defined with 'a, b, c'.
func Vector2.isZero | [src] |
Returns true if this vector is null.
func Vector2.isZeroEpsilon | [src] |
Returns true if this vector is null with an epsilon.
func Vector2.length | [src] |
Return sthe length of the vector.
func Vector2.lengthSquared | [src] |
Returns the squared length of the vector.
func Vector2.lerp | [src] |
Lerp one vector with another.
func Vector2.lineLineIntersect | [src] |
Compute the intersection point of two lines.
func Vector2.max | [src] |
Returns a vector which is the min of two vectors.
func Vector2.min | [src] |
Returns a vector which is the min of two vectors.
func Vector2.nearestPointsSegSeg | [src] |
Returns the minimal segment between two segments (and the minimal distance).
David Eberly, Geometric Tools, Redmond WA 98052 Copyright (c) 1998-2022 Distributed under the Boost Software License, Version 1.0. https://www.boost.org/LICENSE_1_0.txt https://www.geometrictools.com/License/Boost/LICENSE_1_0.txt https://www.geometrictools.com/GTE/Mathematics/DistSegmentSegment.h
func Vector2.negate | [src] |
Negate the vector.
func Vector2.normalize | [src] |
Normalize this vector (set its length to 1).
func Vector2.normalizeSafe | [src] |
Normalize this vector (set its length to 1) even if its length is almost null.
func Vector2.opAffect | [src] |
func Vector2.opAssign | [src] |
func Vector2.opBinary | [src] |
func Vector2.opUnary | [src] |
func Vector2.polyContains | [src] |
Returns true if the given point is inside the polygon PNPoly by W. Randolph Franklin.
func Vector2.rotate | [src] |
Rotate the vector by a given angle.
func Vector2.round | [src] |
Math.round.
func Vector2.segSegIntersect | [src] |
Compute the intersection point of two segments.
func Vector2.set | [src] |
Set content.
func Vector2.setLength | [src] |
Set the vector length.
func Vector2.setLengthSafe | [src] |
Set the vector length.
func Vector2.toNormalize | [src] |
Returns this vector normalized.
func Vector2.toNormalizeSafe | [src] |
Returns this vector normalized even if its length is almost null.
struct Math.Vector3 | [src] |
x | f32 | |
y | f32 | |
z | f32 |
clear | Set the vector to zero. |
distance | Returns the distance between two vectors. |
distanceSquared | Returns the square distance between two vectors. |
dot | Returns the dot product between two vectors. |
isEqualEpsilon | Returns true if this vector is equals to another with an epsilon. |
isZero | Returns true if this vector is null. |
isZeroEpsilon | Returns true if this vector is null with an epsilon. |
length | Return sthe length of the vector. |
lengthSquared | Returns the squared length of the vector. |
lerp | Lerp one vector with another. |
max | Returns a vector which is the min of two vectors. |
min | Returns a vector which is the min of two vectors. |
negate | Negate the vector. |
normalize | Normalize this vector (set its length to 1). |
normalizeSafe | Normalize this vector (set its length to 1) even if its length is almost null. |
set | Set content. |
setLength | Set the vector length. |
setLengthSafe | Set the vector length. |
toNormalize | Returns this vector normalized. |
toNormalizeSafe | Returns this vector normalized even if its length is almost null. |
opAffect | |
opAssign(self, const &Vector3) | |
opAssign(self, f32) | |
opBinary(self, const &Vector3) | |
opBinary(self, f32) | |
opUnary |
func Vector3.clear | [src] |
Set the vector to zero.
func Vector3.distance | [src] |
Returns the distance between two vectors.
func Vector3.distanceSquared | [src] |
Returns the square distance between two vectors.
func Vector3.dot | [src] |
Returns the dot product between two vectors.
func Vector3.isEqualEpsilon | [src] |
Returns true if this vector is equals to another with an epsilon.
func Vector3.isZero | [src] |
Returns true if this vector is null.
func Vector3.isZeroEpsilon | [src] |
Returns true if this vector is null with an epsilon.
func Vector3.length | [src] |
Return sthe length of the vector.
func Vector3.lengthSquared | [src] |
Returns the squared length of the vector.
func Vector3.lerp | [src] |
Lerp one vector with another.
func Vector3.max | [src] |
Returns a vector which is the min of two vectors.
func Vector3.min | [src] |
Returns a vector which is the min of two vectors.
func Vector3.negate | [src] |
Negate the vector.
func Vector3.normalize | [src] |
Normalize this vector (set its length to 1).
func Vector3.normalizeSafe | [src] |
Normalize this vector (set its length to 1) even if its length is almost null.
func Vector3.opAffect | [src] |
func Vector3.opAssign | [src] |
func Vector3.opBinary | [src] |
func Vector3.opUnary | [src] |
func Vector3.set | [src] |
Set content.
func Vector3.setLength | [src] |
Set the vector length.
func Vector3.setLengthSafe | [src] |
Set the vector length.
func Vector3.toNormalize | [src] |
Returns this vector normalized.
func Vector3.toNormalizeSafe | [src] |
Returns this vector normalized even if its length is almost null.
struct Math.Vector4 | [src] |
x | f32 | |
y | f32 | |
z | f32 | |
w | f32 |
clear | Set the vector to zero. |
lerp | Lerp one vector with another. |
opAffect | |
opUnary |
func Vector4.clear | [src] |
Set the vector to zero.
func Vector4.lerp | [src] |
Lerp one vector with another.
func Vector4.opAffect | [src] |
func Vector4.opUnary | [src] |
func Math.abs | [src] |
func Math.acos | [src] |
func Math.asin | [src] |
func Math.atan | [src] |
func Math.atan2 | [src] |
func Math.bigEndianToNative | [src] |
Convert a big endian integer to current arch native format.
func Math.byteswap | [src] |
Swap bytes.
func Math.ceil | [src] |
func Math.clamp | [src] |
func Math.cos | [src] |
func Math.cosh | [src] |
func Math.countOnes | [src] |
Returns the number of bits set to 1.
func Math.cubicLerp | [src] |
func Math.exp | [src] |
func Math.exp2 | [src] |
func Math.floor | [src] |
func Math.gcd | [src] |
Find the gcd between a and b.
func Math.hasByte | [src] |
Determin if an integer has a given byte.
func Math.hasZeroByte | [src] |
Determin if any of the bytes is zero.
func Math.interpHermite | [src] |
func Math.interpQuintic | [src] |
func Math.isEqualEpsilon | [src] |
func Math.isNan | [src] |
func Math.isPowerOf2 | [src] |
func Math.isZeroEpsilon | [src] |
func Math.lcm | [src] |
Find the Least Common Multiple between a and b.
func Math.leadingZeros | [src] |
Returns the number of bits set to 0 from the left.
func Math.lerp | [src] |
func Math.littleEndianToNative | [src] |
Convert a little endian integer to current arch native format.
func Math.log | [src] |
func Math.log10 | [src] |
func Math.log2 | [src] |
func Math.make64 | [src] |
Make a 64 bits with two 32 bits.
func Math.makeRepeat16 | [src] |
Make a 16 bits by repeating a given byte 0x20 => 0x2020.
func Math.makeRepeat32 | [src] |
Make a 32 bits by repeating a given byte 0x20 => 0x20202020.
func Math.makeRepeat64 | [src] |
Make a 64 bits by repeating a given byte 0x20 => 0x20202020_20202020.
func Math.map | [src] |
func Math.max | [src] |
func Math.min | [src] |
func Math.mulAdd | [src] |
func Math.mulU64 | [src] |
func Math.nativeToBigEndian | [src] |
Convert a native arch integer to a big endian.
func Math.pow | [src] |
func Math.reverse | [src] |
Reverse all bits.
func Math.rol | [src] |
Rotate bits left.
func Math.ror | [src] |
Rotate bits right.
func Math.round | [src] |
func Math.roundDownToPowerOf2 | [src] |
func Math.roundUpToPowerOf2 | [src] |
func Math.saturate | [src] |
func Math.sign | [src] |
func Math.sin | [src] |
func Math.sinh | [src] |
func Math.smoothstep | [src] |
func Math.sqrt | [src] |
func Math.tan | [src] |
func Math.tanh | [src] |
func Math.toDegrees | [src] |
func Math.toRadians | [src] |
func Math.trailingZeros | [src] |
Returns the number of bits set to 0 from the right.
func Math.trunc | [src] |
namespace Core.Memory |
align(const ^void, u32) | Align a pointer to the given amount. |
align(u64, u32) | Align a value to the given amount. |
alloc | Allocate a given amount of bytes. |
assertIsAllocated | Check if a given pointer is allocated. |
clear | Clear one block of memory. |
compare | Compare two blocks of memory. |
copy | Copy one block of memory to a given address. |
copyOver | Move one block of memory to a given address. |
delete(*T, IAllocator, string, const &SourceCodeLocation) | Drop and release memory of the given type. |
delete(^T, u64, IAllocator, string, const &SourceCodeLocation) | Drop and release memory of an array of the given type. |
delete(*void, const *TypeInfo, IAllocator, string, const &SourceCodeLocation) | Drop and release memory of the given type. |
equals | Compare two blocks of memory. |
free | Free the specified memory block. |
freeAll | Free all allocated memory of the given allocator if possible. |
freeTemp | Clear the temporary allocator. |
new(IAllocator, u32, string, const &SourceCodeLocation) | Allocate and initialize the given type. |
new(u64, IAllocator, u32, string, const &SourceCodeLocation) | Allocate and initialize an array of the given type. |
new(const *TypeInfo, IAllocator, u32, string, const &SourceCodeLocation) | Allocate and initialize the given type. |
pushAllocator | Push a new allocator for the given block of code. |
pushTempAllocator | Push the temporary allocator for the given block of code. |
realloc | Reallocate/allocate a given amount of bytes. |
set | Set the content of one block of memory to a specific byte value. |
tempAlloc | Allocate a given amount of bytes in the temporary allocator. |
func Memory.align | [src] |
Align a value to the given amount.
Align a pointer to the given amount.
func Memory.alloc | [src] |
Allocate a given amount of bytes.
func Memory.assertIsAllocated | [src] |
Check if a given pointer is allocated.
func Memory.clear | [src] |
Clear one block of memory.
func Memory.compare | [src] |
Compare two blocks of memory.
func Memory.copy | [src] |
Copy one block of memory to a given address.
func Memory.copyOver | [src] |
Move one block of memory to a given address.
func Memory.delete | [src] |
Drop and release memory of the given type.
Drop and release memory of an array of the given type.
func Memory.equals | [src] |
Compare two blocks of memory.
func Memory.free | [src] |
Free the specified memory block.
func Memory.freeAll | [src] |
Free all allocated memory of the given allocator if possible.
func Memory.freeTemp | [src] |
Clear the temporary allocator.
func Memory.new | [src] |
Allocate and initialize the given type.
Allocate and initialize an array of the given type.
func Memory.pushAllocator | [src] |
Push a new allocator for the given block of code.
func Memory.pushTempAllocator | [src] |
Push the temporary allocator for the given block of code.
func Memory.realloc | [src] |
Reallocate/allocate a given amount of bytes.
func Memory.set | [src] |
Set the content of one block of memory to a specific byte value.
func Memory.tempAlloc | [src] |
Allocate a given amount of bytes in the temporary allocator.
namespace Core.Noise |
FastNoise |
FastNoiseKind |
perlin(f32, f32, f32, s32) | |
perlin(f32, f32, s32) | Perlin noise. |
struct Noise.FastNoise | [src] |
kind | Noise.FastNoiseKind | |
seed | s32 | |
octaves | s32 | The number of layers of noise. More octaves create a more varied look but are also more resource-intensive to calculate. |
frequency | f32 | The period in which we sample the noise. A higher frequency results in more frequent noise change. |
lacunarity | f32 | The rate of change of the frequency for each successive octave. A lacunarity value of 1 results in each octave having the same frequency. |
gain | f32 | The scaling factor applied to each octave. gain is only used when octaves is set to a value higher than 1. |
fractalBounding | f32 |
noise | Get a noise result. |
perlinFractalBillow | |
perlinFractalFBM | |
perlinFractalRigidMulti | |
update | Update internal values. |
valueFractalBillow | |
valueFractalFBM | |
valueFractalRigidMulti |
func FastNoise.noise | [src] |
Get a noise result.
func FastNoise.perlinFractalBillow | [src] |
func FastNoise.perlinFractalFBM | [src] |
func FastNoise.perlinFractalRigidMulti | [src] |
func FastNoise.update | [src] |
Update internal values.
Should be called each time an internal parameter has been changed.
func FastNoise.valueFractalBillow | [src] |
func FastNoise.valueFractalFBM | [src] |
func FastNoise.valueFractalRigidMulti | [src] |
enum Noise.FastNoiseKind | [src] |
Perlin | |
PerlinFractalFBM | |
PerlinFractalBillow | |
PerlinFractalRigidMulti | |
Value | |
ValueFractalFBM | |
ValueFractalBillow | |
ValueFractalRigidMulti |
func Noise.perlin | [src] |
Perlin noise.
Result range is [-1, 1]
namespace Core.Parser |
RegExp | Simple regular expression matcher. |
struct Parser.RegExp | [src] |
Simple regular expression matcher.
* | zero or more |
? | zero or one |
+ | one or more |
. | any rune |
^<expr> | start of buffer |
<expr>$ | end of buffer |
a | b |
[abc] | match any in list |
[a-zA-Z] | match any in range |
[[:digit:]] | [0-9] |
[[:xdigit:]] | [a-fA-F0-9] |
[[:alpha:]] | [a-zA-Z] |
[[:alnum:]] | [a-zA-Z0-9] |
[[:lower:]] | [a-z] |
[[:upper:]] | [A-Z] |
[[:blank:]] | whitespace or tab |
[[:space:]] | and whitespace character |
[[:word:]] | [a-zA-Z0-9_] |
[[:ascii:]] | Any ascii character |
[^<interval>] | Inverse of <interval> |
d | [[:digit:]] |
D | [^[:digit:]] |
l | [[:lower:]] |
L | [^[:lower:]] |
u | [[:upper:]] |
U | [^[:upper:]] |
s | [[:space:]] |
S | [^[:space:]] |
w | [[:word:]] |
W | [^[:word:]] |
b | start or end of word |
pL | unicode letter |
pN | unicode number |
pS | unicode symbol |
p{Ll} | unicode lower letter |
p{Lu} | unicode upper letter |
p{Sm} | unicode symbol math |
1 to 9 | backreference to a capture block |
clear | Clear content. |
compile | Compile the expression. |
create | Creates and return an expression. |
getCapture | Returns the parsed string associated with a given captured group. |
getCaptures | Returns all the captured strings, in order. |
grep(self, string) | Find the first occurence in the string. |
grep(string, string) | Find the first occurence in the string. |
grepAll(self, string) | Find all the occurences in the string. |
grepAll(string, string) | Find all the occurences in the string. |
match(self, string) | Returns true if str matches the regexp. |
match(self, string, string, bool) | Compile and match the expression. |
partialMatch | Try to match the start of the string, and returns the matched value or null. |
opDrop | |
opIndex | You can get a capture group value by using the derefence syntax. |
func RegExp.clear | [src] |
Clear content.
func RegExp.compile | [src] |
Compile the expression.
func RegExp.create | [src] |
Creates and return an expression.
func RegExp.getCapture | [src] |
Returns the parsed string associated with a given captured group.
func RegExp.getCaptures | [src] |
Returns all the captured strings, in order.
func RegExp.grep | [src] |
Find the first occurence in the string.
func RegExp.grepAll | [src] |
Find all the occurences in the string.
func RegExp.match | [src] |
Compile and match the expression.
Returns true if str matches the regexp.
Should have been compiled before.
func RegExp.opDrop | [src] |
func RegExp.opIndex | [src] |
You can get a capture group value by using the derefence syntax.
Returns null if the capture group does not exist
func RegExp.partialMatch | [src] |
Try to match the start of the string, and returns the matched value or null.
namespace Core.Path |
combine | Combine multiple paths into one, by adding a directory separator between them if necessary. |
equals | Returns true if the two paths are equal. |
getAbsolute | Transform fullname to an absolute path. |
getDirectoryName | Returns the directory part of the path, null if not found. |
getExtension | Returns the file name extension, including the . character Returns null if no extension was found. |
getExtensionLowerCase | Returns the file name extension, including the . character, in lower case Returns null if no extension was found. |
getFileName | Returns the file name part of the path, null if not found. |
getFileNameWithoutExtension | Returns the path file name, null if not found. |
getRootLength | Returns the length of the root part of the path. |
getRootName | Returns the root part of the path, null if not found. |
hasExtension | Returns true if the file name contains an extension. |
isDirectorySeparator | Returns true if the given character is a directory separator. |
isExtension | Returns true if the given file is of the given extension. |
isRooted | Tests if the given path contains a root. A path is considered rooted if it starts with a directory separator or a drive letter and a colon. |
isValidFileName | Returns true if the given file name is valid. |
isValidPathName | Returns true if the given path name is valid. |
normalize | Normalize path ' are replaced with /' as this is the std norm for paths. |
func Path.combine | [src] |
Combine multiple paths into one, by adding a directory separator between them if necessary.
func Path.equals | [src] |
Returns true if the two paths are equal.
func Path.getAbsolute | [src] |
Transform fullname to an absolute path.
func Path.getDirectoryName | [src] |
Returns the directory part of the path, null if not found.
func Path.getExtension | [src] |
Returns the file name extension, including the . character Returns null if no extension was found.
func Path.getExtensionLowerCase | [src] |
Returns the file name extension, including the . character, in lower case Returns null if no extension was found.
func Path.getFileName | [src] |
Returns the file name part of the path, null if not found.
func Path.getFileNameWithoutExtension | [src] |
Returns the path file name, null if not found.
func Path.getRootLength | [src] |
Returns the length of the root part of the path.
func Path.getRootName | [src] |
Returns the root part of the path, null if not found.
func Path.hasExtension | [src] |
Returns true if the file name contains an extension.
func Path.isDirectorySeparator | [src] |
Returns true if the given character is a directory separator.
func Path.isExtension | [src] |
Returns true if the given file is of the given extension.
func Path.isRooted | [src] |
Tests if the given path contains a root. A path is considered rooted if it starts with a directory separator or a drive letter and a colon.
func Path.isValidFileName | [src] |
Returns true if the given file name is valid.
func Path.isValidPathName | [src] |
Returns true if the given path name is valid.
func Path.normalize | [src] |
Normalize path ' are replaced with /' as this is the std norm for paths.
namespace Core.Random |
CMWC4096 | |
MWC | |
Mt64 | |
Rng |
shared | Get the default per thread random generator. |
struct Random.CMWC4096 | [src] |
q | [4096] u32 | |
c | u32 | |
i | u32 | special invalid value (> 4095) to force the seed on first get. |
nextU32 | |
seedU32 |
func CMWC4096.nextU32 | [src] |
func CMWC4096.seedU32 | [src] |
struct Random.MWC | [src] |
w | u32 | |
z | u32 |
nextU32 | |
seedU32(self, u32) | |
seedU32(self, u32, u32) |
func MWC.nextU32 | [src] |
func MWC.seedU32 | [src] |
struct Random.Mt64 | [src] |
mt | [312] u64 | |
mti | u64 |
nextU64 | |
seedU64(self, const [..] u64) | |
seedU64(self, u64) |
func Mt64.nextU64 | [src] |
func Mt64.seedU64 | [src] |
struct Random.Rng | [src] |
rng | Random.Rng.T | |
seedDone | bool |
nextBool | Returns a random bool. |
nextF32(self) | Range is [0..1[, so 1.0 will never be returned. |
nextF32(self, f32, f32) | Returns a float value in a given range max is excluded. |
nextF64(self) | Range is [0..1[, so 1.0 will never be returned. |
nextF64(self, f64, f64) | Returns a float value in a given range max is excluded. |
nextS32(self) | Returns a signed 32 bits random value. |
nextS32(self, s32, s32) | Returns a signed random value in a given range max is excluded. |
nextS64(self) | Returns a signed 64 bits random value. |
nextS64(self, s64, s64) | Returns a signed random value in a given range max is excluded. |
nextU32(self) | Returns an unsigned 32 bits random value. |
nextU32(self, u32, u32) | Returns an unsigned random value in a given range max is excluded. |
nextU64(self) | Returns an unsigned 64 bits random value. |
nextU64(self, u64, u64) | Returns an unsigned random value in a given range max is excluded. |
seedNow | Seed the rng with the current time. |
seedU32 | Seed random generator with a 32 bits value. |
seedU64 | Seed random generator with a 64 bits value. |
shuffle | Randomly change the order of a slice. |
func Rng.nextBool | [src] |
Returns a random bool.
func Rng.nextF32 | [src] |
Range is [0..1[, so 1.0 will never be returned.
Returns a float value in a given range max is excluded.
func Rng.nextF64 | [src] |
Range is [0..1[, so 1.0 will never be returned.
Returns a float value in a given range max is excluded.
func Rng.nextS32 | [src] |
Returns a signed 32 bits random value.
Returns a signed random value in a given range max is excluded.
func Rng.nextS64 | [src] |
Returns a signed 64 bits random value.
Returns a signed random value in a given range max is excluded.
func Rng.nextU32 | [src] |
Returns an unsigned 32 bits random value.
Returns an unsigned random value in a given range max is excluded.
func Rng.nextU64 | [src] |
Returns an unsigned 64 bits random value.
Returns an unsigned random value in a given range max is excluded.
func Rng.seedNow | [src] |
Seed the rng with the current time.
func Rng.seedU32 | [src] |
Seed random generator with a 32 bits value.
func Rng.seedU64 | [src] |
Seed random generator with a 64 bits value.
func Rng.shuffle | [src] |
Randomly change the order of a slice.
[src] |
Get the default per thread random generator.
namespace Core.Reflection |
appendValueStructArray | Add an element in a Core.Array without knowing the type of the element at compile time but knowing it at runtime (valueType). |
canCopy | |
clearStructArray | Used to clear a Core.Array without knowing the type of the element at compile time but knowing it at runtime (valueType). |
copy | |
crcToType | Convert a crc to a registered typeinfo. |
getAttribute(const *TypeInfo, const *TypeInfo) | Returns the given associated attribute to type or null. |
getAttribute(const *TypeValue, const *TypeInfo) | Returns the given associated attribute to value or null. |
getAttributeValue(const *TypeValue, const *TypeInfo, string, T) | Returns the given attribute value, or null. |
getAttributeValue(const *Attribute, string) | Returns the given attribute value, or null. |
getAttributeValue(const *TypeInfo, const *TypeInfo, string) | Returns the given attribute value, or null. |
getAttributeValue(const *TypeValue, const *TypeInfo, string) | Returns the given attribute value, or null. |
getAttributes(const *TypeInfo, const *TypeInfo) | Returns the given associated attributes to type. |
getAttributes(const *TypeValue, const *TypeInfo) | Returns the given associated attributes to value. |
getEnumName | Returns the enum value name corresponding to the value pointed by valueAddr Can have multiple names if the enum is tagged with #[Swag.EnumFlags]. |
getEnumValue | Get information about a specific value in a given enum Returns null if the value does not exist. |
getField | Get information about a specific field in a given struct Returns null if the field does not exist. |
getFieldValue | Get a field value with a given runtime type. |
getMethod | Get information about a specific method in a given struct. |
getStructArrayType | Returns the generic type of the Core.Array typeinfo. |
hasAttribute(const *TypeInfo, const *TypeInfo) | Returns true if the given type has the associated attribute. |
hasAttribute(const *TypeValue, const *TypeInfo) | Returns true if the given value has the associated attribute. |
hasDrop | |
hasInterface | Returns true if the interface itf is implemented in the given structure type. |
hasMethod | Helper function to know if a struct has a special method. |
hasPostCopy | |
hasPostMove | |
isAny | |
isBool | |
isEnum | |
isEnumFlags | |
isFloat | |
isGeneric | |
isInteger | |
isInterface | |
isNative | |
isPod | |
isPointer | |
isPointerArithmetic | |
isPointerRef | |
isRune | |
isSimpleNative | |
isSlice | |
isStaticArray | |
isString | |
isStruct | |
isStructArray | Returns true if the type t is a Core.Array type. |
isStructOfName | Returns true if this is a struct of the given name. |
isTuple | |
isType | |
isTypeAlias | |
makeConcreteAlias | In case this is a type alias, need to go deep inside it to find the right type. |
makeConcreteEnum | Transform an enum type to its underling real native type. |
maxSizeOf | Returns the maximum sizeof a bunch of typeinfo. |
nameToType | Convert a crc to a registered typeinfo. |
orFlags | Make an union of flags of all types. |
removeValueStructArray | Remove an element in a Core.Array without knowing the type of the element at compile time but knowing it at runtime (valueType). |
setFieldValue | Set a field value with a given runtime type. |
func Reflection.appendValueStructArray | [src] |
Add an element in a Core.Array without knowing the type of the element at compile time but knowing it at runtime (valueType).
func Reflection.canCopy | [src] |
func Reflection.clearStructArray | [src] |
Used to clear a Core.Array without knowing the type of the element at compile time but knowing it at runtime (valueType).
func Reflection.copy | [src] |
func Reflection.crcToType | [src] |
Convert a crc to a registered typeinfo.
func Reflection.getAttribute | [src] |
Returns the given associated attribute to value or null.
Returns the given associated attribute to type or null.
func Reflection.getAttributeValue | [src] |
Returns the given attribute value, or null.
func Reflection.getAttributes | [src] |
Returns the given associated attributes to value.
Returns the given associated attributes to type.
func Reflection.getEnumName | [src] |
Returns the enum value name corresponding to the value pointed by valueAddr Can have multiple names if the enum is tagged with #[Swag.EnumFlags].
func Reflection.getEnumValue | [src] |
Get information about a specific value in a given enum Returns null if the value does not exist.
func Reflection.getField | [src] |
Get information about a specific field in a given struct Returns null if the field does not exist.
func Reflection.getFieldValue | [src] |
Get a field value with a given runtime type.
func Reflection.getMethod | [src] |
Get information about a specific method in a given struct.
Returns null if the method does not exist
func Reflection.getStructArrayType | [src] |
Returns the generic type of the Core.Array typeinfo.
If t is not a Core.Array, returns null
func Reflection.hasAttribute | [src] |
Returns true if the given value has the associated attribute.
Returns true if the given type has the associated attribute.
func Reflection.hasDrop | [src] |
func Reflection.hasInterface | [src] |
Returns true if the interface itf is implemented in the given structure type.
func Reflection.hasMethod | [src] |
Helper function to know if a struct has a special method.
func Reflection.hasPostCopy | [src] |
func Reflection.hasPostMove | [src] |
func Reflection.isAny | [src] |
func Reflection.isBool | [src] |
func Reflection.isEnum | [src] |
func Reflection.isEnumFlags | [src] |
func Reflection.isFloat | [src] |
func Reflection.isGeneric | [src] |
func Reflection.isInteger | [src] |
func Reflection.isInterface | [src] |
func Reflection.isNative | [src] |
func Reflection.isPod | [src] |
func Reflection.isPointer | [src] |
func Reflection.isPointerArithmetic | [src] |
func Reflection.isPointerRef | [src] |
func Reflection.isRune | [src] |
func Reflection.isSimpleNative | [src] |
func Reflection.isSlice | [src] |
func Reflection.isStaticArray | [src] |
func Reflection.isString | [src] |
func Reflection.isStruct | [src] |
func Reflection.isStructArray | [src] |
Returns true if the type t is a Core.Array type.
func Reflection.isStructOfName | [src] |
Returns true if this is a struct of the given name.
func Reflection.isTuple | [src] |
func Reflection.isType | [src] |
func Reflection.isTypeAlias | [src] |
func Reflection.makeConcreteAlias | [src] |
In case this is a type alias, need to go deep inside it to find the right type.
func Reflection.makeConcreteEnum | [src] |
Transform an enum type to its underling real native type.
func Reflection.maxSizeOf | [src] |
Returns the maximum sizeof a bunch of typeinfo.
func Reflection.nameToType | [src] |
Convert a crc to a registered typeinfo.
func Reflection.orFlags | [src] |
Make an union of flags of all types.
func Reflection.removeValueStructArray | [src] |
Remove an element in a Core.Array without knowing the type of the element at compile time but knowing it at runtime (valueType).
func Reflection.setFieldValue | [src] |
Set a field value with a given runtime type.
namespace Core.Serialization |
Decoder | Serialization decoder. |
Encoder | Serialization encoder. |
Serializer |
DecoderFlags | |
SectionKind |
isPodFinal | Determin if a type can be serialized by a simple copy. |
Alias | Accept this other name for the struct field or the struct itself. |
Final | The struct does not need versionning. |
NoSerialize | Do not serialize a struct or a field. |
Version | Set the struct version number. |
attr Serialization.Alias | [src] |
Accept this other name for the struct field or the struct itself.
struct Serialization.Decoder | [src] |
Serialization decoder.
serializer | Serialization.Decoder.T | |
flags | Serialization.DecoderFlags |
This is a high level decoder that needs a specific implementation like Core.Serialization.Read.TagBin or Core.Serialization.Read.JSon.
end | Finish reading. |
readAll | Read a full struct. |
readTypeValue | |
readValue | |
start | Start reading. |
func IDecoder.beginField | [src] |
func IDecoder.beginSection | [src] |
func IDecoder.end | [src] |
func IDecoder.endField | [src] |
func IDecoder.endSection | [src] |
func IDecoder.getVersion | [src] |
func IDecoder.isTextual | [src] |
func IDecoder.read | [src] |
func IDecoder.readBool | [src] |
func IDecoder.readBufferU8 | [src] |
func IDecoder.readF32 | [src] |
func IDecoder.readF64 | [src] |
func IDecoder.readS16 | [src] |
func IDecoder.readS32 | [src] |
func IDecoder.readS64 | [src] |
func IDecoder.readS8 | [src] |
func IDecoder.readString | [src] |
func IDecoder.readU16 | [src] |
func IDecoder.readU32 | [src] |
func IDecoder.readU64 | [src] |
func IDecoder.readU8 | [src] |
func IDecoder.start | [src] |
func Decoder.end | [src] |
Finish reading.
func Decoder.readAll | [src] |
Read a full struct.
func Decoder.readTypeValue | [src] |
func Decoder.readValue | [src] |
func Decoder.start | [src] |
Start reading.
enum Serialization.DecoderFlags | [src] |
Zero | |
IgnoreStructFieldError |
struct Serialization.Encoder | [src] |
Serialization encoder.
serializer | Serialization.Encoder.T | |
errorIfUnknown | bool | If true, an error will be raised if a type cannot be saved. The field will be ignored if set to false. |
This is a high level encoder that needs a specific implementation like Core.Serialization.Write.TagBin or Core.Serialization.Write.JSon.
Can be serialized:
Type string is not supported. Consider using Core.String instead.
A struct can implement the ISerialize interface in order to have a specific serialization. If not defined, then the struct will be saved field by field.
end | End serialization. |
start | Start serialization. |
writeAll | Write a full struct. |
writeTypeValue | Write a given Swag.TypeValue. |
writeValue | Write a given value with a given type. |
func IEncoder.beginField | [src] |
func IEncoder.beginSection | [src] |
func IEncoder.end | [src] |
End serialization.
func IEncoder.endField | [src] |
func IEncoder.endSection | [src] |
func IEncoder.isTextual | [src] |
func IEncoder.start | [src] |
Start serialization.
func IEncoder.write | [src] |
func IEncoder.writeBool | [src] |
func IEncoder.writeBufferU8 | [src] |
func IEncoder.writeF32 | [src] |
func IEncoder.writeF64 | [src] |
func IEncoder.writeS16 | [src] |
func IEncoder.writeS32 | [src] |
func IEncoder.writeS64 | [src] |
func IEncoder.writeS8 | [src] |
func IEncoder.writeString | [src] |
func IEncoder.writeU16 | [src] |
func IEncoder.writeU32 | [src] |
func IEncoder.writeU64 | [src] |
func IEncoder.writeU8 | [src] |
func Encoder.end | [src] |
End serialization.
func Encoder.start | [src] |
Start serialization.
func Encoder.writeAll | [src] |
Write a full struct.
Will call Encoder.start, Encoder.writeValue and Encoder.end
func Encoder.writeTypeValue | [src] |
Write a given Swag.TypeValue.
func Encoder.writeValue | [src] |
Write a given value with a given type.
attr Serialization.Final | [src] |
The struct does not need versionning.
interface Serialization.IDecoder | [src] |
getVersion | func(*Serialization.IDecoder)->u32 | |
isTextual | func(*Serialization.IDecoder)->bool | |
start | func(*Serialization.IDecoder, const [..] u8) throw | |
end | func(*Serialization.IDecoder) throw | |
beginField | func(*Serialization.IDecoder, Swag.TypeValue)->bool throw | |
endField | func(*Serialization.IDecoder) throw | |
beginSection | func(*Serialization.IDecoder, Serialization.SectionKind) throw | |
endSection | func(*Serialization.IDecoder) throw | |
read | func(*Serialization.IDecoder, *void, const *Swag.TypeInfo) throw | |
readBufferU8 | func(*Serialization.IDecoder, u64)->*u8 throw | |
readBool | func(*Serialization.IDecoder)->bool throw | |
readS8 | func(*Serialization.IDecoder)->s8 throw | |
readS16 | func(*Serialization.IDecoder)->s16 throw | |
readS32 | func(*Serialization.IDecoder)->s32 throw | |
readS64 | func(*Serialization.IDecoder)->s64 throw | |
readU8 | func(*Serialization.IDecoder)->u8 throw | |
readU16 | func(*Serialization.IDecoder)->u16 throw | |
readU32 | func(*Serialization.IDecoder)->u32 throw | |
readU64 | func(*Serialization.IDecoder)->u64 throw | |
readF32 | func(*Serialization.IDecoder)->f32 throw | |
readF64 | func(*Serialization.IDecoder)->f64 throw | |
readString | func(*Serialization.IDecoder)->String throw |
interface Serialization.IEncoder | [src] |
isTextual | func(*Serialization.IEncoder)->bool | |
start | func(*Serialization.IEncoder, *ConcatBuffer) throw | |
end | func(*Serialization.IEncoder) throw | |
beginField | func(*Serialization.IEncoder, Swag.TypeValue) throw | |
endField | func(*Serialization.IEncoder) throw | |
beginSection | func(*Serialization.IEncoder, Serialization.SectionKind) throw | |
endSection | func(*Serialization.IEncoder) throw | |
write | func(*Serialization.IEncoder, const ^void, const *Swag.TypeInfo) throw | |
writeBufferU8 | func(*Serialization.IEncoder, const ^u8, u64) throw | |
writeBool | func(*Serialization.IEncoder, bool) | |
writeS8 | func(*Serialization.IEncoder, s8) | |
writeS16 | func(*Serialization.IEncoder, s16) | |
writeS32 | func(*Serialization.IEncoder, s32) | |
writeS64 | func(*Serialization.IEncoder, s64) | |
writeU8 | func(*Serialization.IEncoder, u8) | |
writeU16 | func(*Serialization.IEncoder, u16) | |
writeU32 | func(*Serialization.IEncoder, u32) | |
writeU64 | func(*Serialization.IEncoder, u64) | |
writeF32 | func(*Serialization.IEncoder, f32) | |
writeF64 | func(*Serialization.IEncoder, f64) | |
writeString | func(*Serialization.IEncoder, string) |
interface Serialization.ISerialize | [src] |
read | func(*Serialization.ISerialize, Serialization.IDecoder)->bool throw | |
write | func(*Serialization.ISerialize, Serialization.IEncoder)->bool throw | |
readElement | func(*Serialization.ISerialize, Swag.TypeValue, *void, Serialization.IDecoder)->bool throw | |
writeElement | func(*Serialization.ISerialize, Swag.TypeValue, const *void, Serialization.IEncoder)->bool throw | |
postRead | func(*Serialization.ISerialize, *void, Serialization.IDecoder) throw |
attr Serialization.NoSerialize | [src] |
Do not serialize a struct or a field.
namespace Core.Serialization.Read |
JSon | A simple JSON reader. |
TagBin | Binary serializer with forward/backward compatibility. |
TagBinOptions | |
TagBinSection | |
Xml | A simple XML reader. |
struct Read.JSon | [src] |
A simple JSON reader.
stream | ByteStream | |
line | u64 | |
col | u64 | |
propName | String |
In the case of a struct, the JSON file must represent the structure layout (order of fields matters).
func JSon.beginElement | [src] |
func JSon.beginRoot | [src] |
func JSon.beginSection | [src] |
func JSon.beginSequence | [src] |
func JSon.beginStruct | [src] |
func JSon.beginValue | [src] |
func JSon.endElement | [src] |
func JSon.endRoot | [src] |
func JSon.endSection | [src] |
func JSon.endSequence | [src] |
func JSon.endStruct | [src] |
func JSon.endValue | [src] |
func JSon.getError | [src] |
func JSon.getVersion | [src] |
func JSon.isTextual | [src] |
func JSon.readNative | [src] |
func JSon.startRead | [src] |
func JSon.toNextSequenceElement | [src] |
func JSon.zapBlanks | [src] |
struct Read.TagBin | [src] |
Binary serializer with forward/backward compatibility.
stream | ByteStream | |
options | Serialization.Read.TagBinOptions | |
freeSections | ArrayPtr'(Core.Serialization.Read.TagBinSection) | |
sections | ArrayPtr'(Core.Serialization.Read.TagBinSection) | |
convertNextNative | const *Swag.TypeInfoNative | |
convertValToArray | bool | |
convertArrayToVal | bool |
Changes that are supported from V to V+1 are :
Supported type changes are :
Supported attributes are :
beginElement | |
beginRoot | |
beginSection | |
beginSequence | |
beginStruct | |
beginValue | |
endElement | |
endRoot | |
endSection | |
endSequence | |
endStruct | |
endValue | |
getVersion | |
isTextual | |
readNative | |
startRead | |
toNextSequenceElement |
func TagBin.beginElement | [src] |
func TagBin.beginRoot | [src] |
func TagBin.beginSection | [src] |
func TagBin.beginSequence | [src] |
func TagBin.beginStruct | [src] |
func TagBin.beginValue | [src] |
func TagBin.endElement | [src] |
func TagBin.endRoot | [src] |
func TagBin.endSection | [src] |
func TagBin.endSequence | [src] |
func TagBin.endStruct | [src] |
func TagBin.endValue | [src] |
func TagBin.getVersion | [src] |
func TagBin.isTextual | [src] |
func TagBin.readNative | [src] |
func TagBin.startRead | [src] |
func TagBin.toNextSequenceElement | [src] |
struct Read.TagBinOptions | [src] |
tryForward | bool | Accept to try to read a newest version, otherwise error. |
struct Read.TagBinSection | [src] |
mapSeek | HashTable'(u32, u64) | |
afterFatSeek | u64 | |
version | u32 | |
kind | Serialization.SectionKind | |
skipFat | bool |
struct Read.Xml | [src] |
A simple XML reader.
stream | ByteStream | |
line | u64 | |
col | u64 | |
stackTags | Array'(string) |
In the case of a struct, the XML file must represent the structure layout (order of fields matters).
func Xml.beginElement | [src] |
func Xml.beginRoot | [src] |
func Xml.beginSection | [src] |
func Xml.beginSequence | [src] |
func Xml.beginStruct | [src] |
func Xml.beginValue | [src] |
func Xml.endElement | [src] |
func Xml.endRoot | [src] |
func Xml.endSection | [src] |
func Xml.endSequence | [src] |
func Xml.endStruct | [src] |
func Xml.endValue | [src] |
func Xml.getError | [src] |
func Xml.getVersion | [src] |
func Xml.isTextual | [src] |
func Xml.readEndTag | [src] |
func Xml.readNative | [src] |
func Xml.readStartTag | [src] |
func Xml.readTag | [src] |
func Xml.startRead | [src] |
func Xml.toNextSequenceElement | [src] |
func Xml.zapBlanks | [src] |
enum Serialization.SectionKind | [src] |
Raw | |
Unordered | |
Ordered |
struct Serialization.Serializer | [src] |
encode | Serialization.IEncoder | |
decode | Serialization.IDecoder | |
isWrite | bool |
beginSection | Start a new section. |
end | End encoding/decoding. |
endSection | End the previous section. |
isReading | |
isWriting | |
serialize(self, string, *MT) | Serialize one value. |
serialize(self, string, u32, *MT) | Serialize one value. |
startRead | Start decoding. |
startWrite | Start encoding. |
func Serializer.beginSection | [src] |
Start a new section.
func Serializer.end | [src] |
End encoding/decoding.
func Serializer.endSection | [src] |
End the previous section.
func Serializer.isReading | [src] |
func Serializer.isWriting | [src] |
func Serializer.serialize | [src] |
Serialize one value.
func Serializer.startRead | [src] |
Start decoding.
func Serializer.startWrite | [src] |
Start encoding.
attr Serialization.Version | [src] |
Set the struct version number.
namespace Core.Serialization.Write |
JSon | A JSON writer. |
JSonOptions | |
TagBin | |
TagBinSection |
TagBinSignatures |
struct Write.JSon | [src] |
A JSON writer.
options | Serialization.Write.JSonOptions | |
output | *ConcatBuffer | |
indent | u32 | |
fmtInt | StrConv.ConvertFormatInt | |
fmtFloat | StrConv.ConvertFormatFloat | |
lastSeekValue | ConcatBufferSeek |
beginElement | |
beginRoot | |
beginSection | |
beginSequence | |
beginStruct | |
beginValue | |
endElement | |
endRoot | |
endSection | |
endSequence | |
endStruct | |
endValue | |
isTextual | |
startWrite | |
writeIndent | |
writeNative |
func JSon.beginElement | [src] |
func JSon.beginRoot | [src] |
func JSon.beginSection | [src] |
func JSon.beginSequence | [src] |
func JSon.beginStruct | [src] |
func JSon.beginValue | [src] |
func JSon.endElement | [src] |
func JSon.endRoot | [src] |
func JSon.endSection | [src] |
func JSon.endSequence | [src] |
func JSon.endStruct | [src] |
func JSon.endValue | [src] |
func JSon.isTextual | [src] |
func JSon.startWrite | [src] |
func JSon.writeIndent | [src] |
func JSon.writeNative | [src] |
struct Write.JSonOptions | [src] |
indentLevel | u32 | |
saveBlanks | bool |
struct Write.TagBin | [src] |
output | *ConcatBuffer | |
freeSections | ArrayPtr'(Core.Serialization.Write.TagBinSection) | |
sections | ArrayPtr'(Core.Serialization.Write.TagBinSection) |
beginElement | |
beginRoot | |
beginSection | |
beginSequence | |
beginStruct | |
beginValue | |
endElement | |
endRoot | |
endSection | |
endSequence | |
endStruct | |
endValue | |
isTextual | |
startWrite | |
writeNative |
func TagBin.beginElement | [src] |
func TagBin.beginRoot | [src] |
func TagBin.beginSection | [src] |
func TagBin.beginSequence | [src] |
func TagBin.beginStruct | [src] |
func TagBin.beginValue | [src] |
func TagBin.endElement | [src] |
func TagBin.endRoot | [src] |
func TagBin.endSection | [src] |
func TagBin.endSequence | [src] |
func TagBin.endStruct | [src] |
func TagBin.endValue | [src] |
func TagBin.isTextual | [src] |
func TagBin.startWrite | [src] |
func TagBin.writeNative | [src] |
struct Write.TagBinSection | [src] |
startSeek | ConcatBufferSeek | |
mapSeek | HashTable'(u32, Core.ConcatBufferSeek) | |
kind | Serialization.SectionKind |
enum Write.TagBinSignatures | [src] |
Root | |
Fat | |
Sequence | |
Version | |
Raw | |
UnRaw |
func Serialization.isPodFinal | [src] |
Determin if a type can be serialized by a simple copy.
namespace Core.Slice |
allOf | Returns true if cb returns true for all values. |
anyOf | Returns true if cb returns true for at least one value. |
contains | Returns true if the given slice contains the value. |
containsSorted | Returns true if the given slice contains the value. |
equals | Returns true if two slices are equal. |
findLinear | Find value in a slice by performing a linear search. |
findSlice | Returns true if the given slice contains the sub slice value. |
findSorted | Find value in a slice by performing a binary search. |
insertionSort | Insertion sort algorithm (slow). |
isSorted(const [..] T) | Returns true if the slice is sorted. |
isSorted(const [..] T, func(*void, T, T)->s32) | Returns true if the slice is sorted. |
map | Map the content of a slice to an array of type R. |
max | Get the maximum value of a slice, and the corresponding value index. |
min | Get the minimum value of a slice, and the corresponding value index. |
modify | Transform in place the content of a slice with a given lambda. |
nextPermutation | Get a permutation of the slice Shuffle the slice until no more permutation is possible, and then returns false. To obtain all permutations, the slice must be sorted the first time. |
noneOf | Returns true if cb returns false for all values. |
quickSort | Quick sort algorithm. |
reduce | Reduce the content of a slice to one single value. |
reverse | Reverse the content of a slice. |
sort([..] T, bool) | Sort the slice, by picking the right algorithm depending on the type and the number of elements. |
sort([..] T, func(*void, T, T)->s32) | Sort the slice, by picking the right algorithm depending on the type and the number of elements. |
func Slice.allOf | [src] |
Returns true if cb returns true for all values.
func Slice.anyOf | [src] |
Returns true if cb returns true for at least one value.
func Slice.contains | [src] |
Returns true if the given slice contains the value.
func Slice.containsSorted | [src] |
Returns true if the given slice contains the value.
The slice must be sorted in ascending order
func Slice.equals | [src] |
Returns true if two slices are equal.
func Slice.findLinear | [src] |
Find value in a slice by performing a linear search.
O^n, but slice does not have to be sorted. Returns Swag.U64.Max if not found.
func Slice.findSlice | [src] |
Returns true if the given slice contains the sub slice value.
func Slice.findSorted | [src] |
Find value in a slice by performing a binary search.
The slice must be sorted in ascending order Returns Swag.U64.Max if not found.
func Slice.insertionSort | [src] |
Insertion sort algorithm (slow).
func Slice.isSorted | [src] |
Returns true if the slice is sorted.
func Slice.map | [src] |
Map the content of a slice to an array of type R.
The lambda must return the value of R for each element of the slice.
func Slice.max | [src] |
Get the maximum value of a slice, and the corresponding value index.
func Slice.min | [src] |
Get the minimum value of a slice, and the corresponding value index.
func Slice.modify | [src] |
Transform in place the content of a slice with a given lambda.
func Slice.nextPermutation | [src] |
Get a permutation of the slice Shuffle the slice until no more permutation is possible, and then returns false. To obtain all permutations, the slice must be sorted the first time.
func Slice.noneOf | [src] |
Returns true if cb returns false for all values.
func Slice.quickSort | [src] |
Quick sort algorithm.
func Slice.reduce | [src] |
Reduce the content of a slice to one single value.
The lambda is called with the previous reduced value and each element of the slice. The first reduced value is the first element of the slice.
func Slice.reverse | [src] |
Reverse the content of a slice.
func Slice.sort | [src] |
Sort the slice, by picking the right algorithm depending on the type and the number of elements.
struct Core.StaticArray | [src] |
buffer | [?] StaticArray.T | |
count | u64 |
add(self, &&T) | Move one element at the end of the array. |
add(self, T) | Add a copy of one element at the end of the array. |
add(self, const [..] T) | Append a slice to the end of this instance. |
addOnce | Add a copy of one element at the end of the array. |
back | Returns a copy of the last element. |
backPtr | Returns the address of the last element. |
clear | Set the number of elements to 0. |
contains | Returns true if the given value is in the array. |
emplaceAddress | Reserve room at the end of the array for num elements. |
emplaceAt | Move some values at the given index. |
emplaceInitAddress | Reserve room at the end of the array for num elements. |
free | Free the array content. |
front | Returns a copy of the first element. |
frontPtr | Returns the address of the first element. |
insertAt(self, u64, &&T) | Move a value at the given index. |
insertAt(self, u64, T) | Insert a value at the given index. |
insertAt(self, u64, const [..] T) | Insert some values at the given index. |
isEmpty | Returns true if the array is empty. |
popBack | Returns a copy of the last element, and remove it from the array. |
remove(self, V) | Remove the given value If not found, does nothing. |
remove(self, u64, u64) | Remove num elements starting at index. |
removeAt | Remove an element at index by replacing it with the last element. |
removeAtOrdered | Remove numValues elements at index by shifting all others. |
removeBack | Remove the last element. |
removeOrdered | Remove the given value If not found, does nothing. |
resize | Change the number of valid elements in the array. |
sort(self) | Sort array. |
sort(self, func(*void, T, T)->s32) | Sort array. |
sortReverse | Sort array in reverse order (from biggest to lowest value). |
toSlice | Returns a slice. |
opAffect | Initializes an Array that contains values copied from the specified array. |
opCast(self) | |
opCast(self) | |
opCount | |
opData | |
opDrop | |
opIndex(self, u64) | |
opIndex(self, u64) | |
opIndexAffect | |
opIndexAssign | |
opSlice | |
opVisit | Visit every elements of the array. |
func StaticArray.add | [src] |
Add a copy of one element at the end of the array.
Move one element at the end of the array.
Append a slice to the end of this instance.
func StaticArray.addOnce | [src] |
Add a copy of one element at the end of the array.
func StaticArray.back | [src] |
Returns a copy of the last element.
func StaticArray.backPtr | [src] |
Returns the address of the last element.
func StaticArray.clear | [src] |
Set the number of elements to 0.
func StaticArray.contains | [src] |
Returns true if the given value is in the array.
func StaticArray.emplaceAddress | [src] |
Reserve room at the end of the array for num elements.
Does not initialize them. Returns the address of the first element
func StaticArray.emplaceAt | [src] |
Move some values at the given index.
If index is equal to count, then the values are moved at the end of the array. Order is preserved.
func StaticArray.emplaceInitAddress | [src] |
Reserve room at the end of the array for num elements.
Returns the address of the first element
func StaticArray.free | [src] |
Free the array content.
func StaticArray.front | [src] |
Returns a copy of the first element.
func StaticArray.frontPtr | [src] |
Returns the address of the first element.
func StaticArray.insertAt | [src] |
Insert a value at the given index.
If index is equal to count, then the value is added at the end of the array. Order is preserved.
Move a value at the given index.
If index is equal to count, then the value is added at the end of the array. Order is preserved.
Insert some values at the given index.
If index is equal to count, then the values are added at the end of the array. Order is preserved.
func StaticArray.isEmpty | [src] |
Returns true if the array is empty.
func StaticArray.opAffect | [src] |
Initializes an Array that contains values copied from the specified array.
func StaticArray.opCast | [src] |
func StaticArray.opCount | [src] |
func StaticArray.opData | [src] |
func StaticArray.opDrop | [src] |
func StaticArray.opIndex | [src] |
func StaticArray.opIndexAffect | [src] |
func StaticArray.opIndexAssign | [src] |
func StaticArray.opSlice | [src] |
func StaticArray.opVisit | [src] |
Visit every elements of the array.
Visiting by pointer and in reverse order is supported
func StaticArray.popBack | [src] |
Returns a copy of the last element, and remove it from the array.
func StaticArray.remove | [src] |
Remove num elements starting at index.
Remove the given value If not found, does nothing.
func StaticArray.removeAt | [src] |
Remove an element at index by replacing it with the last element.
Order is not preserved
func StaticArray.removeAtOrdered | [src] |
Remove numValues elements at index by shifting all others.
Order is preserved
func StaticArray.removeBack | [src] |
Remove the last element.
func StaticArray.removeOrdered | [src] |
Remove the given value If not found, does nothing.
func StaticArray.resize | [src] |
Change the number of valid elements in the array.
func StaticArray.sort | [src] |
Sort array.
func StaticArray.sortReverse | [src] |
Sort array in reverse order (from biggest to lowest value).
func StaticArray.toSlice | [src] |
Returns a slice.
namespace Core.StrConv |
ConvertFormat | |
ConvertFormatFloat | Format structure to convert a float to a string. |
ConvertFormatInt | Format structure to convert an integer to a string. |
StringBuilder |
convert | Templated version. Convert a value of type T. |
convertAny | Convert a value to an utf8 string, and append the result in a ConcatBuffer. |
convertBool | Convert a bool to a string, and put the result in a ConcatBuffer. |
convertFloat(*ConcatBuffer, any, const &ConvertFormat, string) | Convert a float to an utf8 string, and put the result in a ConcatBuffer. |
convertFloat(*ConcatBuffer, any, const &ConvertFormatFloat) | Convert a float to an utf8 string, and put the result in a ConcatBuffer. |
convertInt(*ConcatBuffer, any, const &ConvertFormat, string) | Convert an integer to an utf8 string, and put the result in a ConcatBuffer. |
convertInt(*ConcatBuffer, any, const &ConvertFormatInt) | Convert an integer to an utf8 string, and put the result in a ConcatBuffer. |
convertRune | Convert a rune to a string, and put the result in a ConcatBuffer. |
convertStruct | Convert a structure content to an utf8 string, and put the result in a ConcatBuffer. |
parseB64 | Convert an utf8 buffer in binary to an unsigned integer value. |
parseBool | Convert an utf8 buffer to a boolean. |
parseF32 | Convert an utf8 buffer to a floating point value. |
parseF64 | |
parseIdentifier | Parse an identifier name in the sens of swag (ascii). |
parseRune | Convert an utf8 buffer to a simple rune. |
parseS16 | |
parseS32 | |
parseS64 | |
parseS8 | Convert an utf8 buffer to an signed integer value. |
parseString | Convert an utf8 buffer to a String. |
parseU16 | |
parseU32 | |
parseU64 | |
parseU8 | Convert an utf8 buffer in decimal to an unsigned integer value. |
parseValue | This function will parse the string buf and decode the corresponding value in addr. |
parseX64 | Convert an utf8 buffer in hexadecimal to an unsigned integer value. |
toDisplaySize | Convert a size in a displayable format (with Kb, Mb and so on). |
toF32 | Transform a string to an f32. |
toF64 | Transform a string to an f64. |
toNum | Transform a string to an integer or float. |
toS16 | Transform a string to an s16. |
toS32 | Transform a string to an s32. |
toS64 | Transform a string to an s64. |
toS8 | Transform a string to an s8. |
toU16 | Transform a string to an u16. |
toU32 | Transform a string to an u32. |
toU64 | Transform a string to an u64. |
toU8 | Transform a string to an u8. |
namespace Core.StrConv.Atod |
parse |
func Atod.parse | [src] |
struct StrConv.ConvertFormat | [src] |
formatInt | StrConv.ConvertFormatInt | |
formatFloat | StrConv.ConvertFormatFloat |
struct StrConv.ConvertFormatFloat | [src] |
Format structure to convert a float to a string.
precision | s8 | -1 is for 'most possible precision'. |
fmt | u8 | |
forceSign | bool |
setFormat | Set some format options with a given user string. |
func ConvertFormatFloat.setFormat | [src] |
Set some format options with a given user string.
Format is [+][fmt][precision]
+
To force the positive sign if the number is positive + fmt This is the output format:
e | -d.dddde±dd, a decimal exponent |
E | -d.ddddE±dd, a decimal exponent |
f | -ddd.dddd, no exponent |
g | e for large exponents, f otherwise |
G | E for large exponents, f otherwise |
precision
A number which is the precision of the fractional part
struct StrConv.ConvertFormatInt | [src] |
Format structure to convert an integer to a string.
base | u32 | |
padding | u8 | |
width | u8 | |
forceSign | bool |
If signed is true, the value to convert must be stored in signedValue, otherwise it must be stored in unsignedValue.
setFormat | Set some format options with a given user string. |
func ConvertFormatInt.setFormat | [src] |
Set some format options with a given user string.
The format is [+][fmt][padding][width]'
+'
To force the positive sign if the number is positive + fmt This is the output format:
B | Binary |
D | Decimal |
X | Hexadecimal |
padding
The padding character, in ascii. It's mandatory before the next field + width The width of the output, in number of characters
namespace Core.StrConv.Dtoa |
parse | Convert of floating value to a string. |
func Dtoa.parse | [src] |
Convert of floating value to a string.
The format fmt is one of:
e | -d.dddde±dd, a decimal exponent |
E | -d.ddddE±dd, a decimal exponent |
f | -ddd.dddd, no exponent |
g | e for large exponents, f otherwise |
G | E for large exponents, f otherwise |
A negative precision means only as much as needed to be exact
interface StrConv.IConvert | [src] |
convert | func(*StrConv.IConvert, *ConcatBuffer, StrConv.ConvertFormat, string) |
interface StrConv.IPokeValue | [src] |
poke | func(*StrConv.IPokeValue, string)->string throw |
struct StrConv.StringBuilder | [src] |
buffer | ConcatBuffer |
appendAny | Append a value. |
appendEOL | Append a end of line. |
appendFormat | Append a formatted string. |
appendRune | Append a rune. |
appendString | Append a string. |
clear | Clear the content of the builder. |
count | Returns the number of characters. |
moveToString | Return the content as a string by eating the content of the string builder (if possible). |
setBucketSize | Set sizes of buckets of the string builder. |
toString | Return the content as a string. |
zeroTerminated | Force a ending 0. |
func StringBuilder.appendAny | [src] |
Append a value.
func StringBuilder.appendEOL | [src] |
Append a end of line.
func StringBuilder.appendFormat | [src] |
Append a formatted string.
func StringBuilder.appendRune | [src] |
Append a rune.
func StringBuilder.appendString | [src] |
Append a string.
func StringBuilder.clear | [src] |
Clear the content of the builder.
func StringBuilder.count | [src] |
Returns the number of characters.
func StringBuilder.moveToString | [src] |
Return the content as a string by eating the content of the string builder (if possible).
func StringBuilder.setBucketSize | [src] |
Set sizes of buckets of the string builder.
func StringBuilder.toString | [src] |
Return the content as a string.
func StringBuilder.zeroTerminated | [src] |
Force a ending 0.
func StrConv.convert | [src] |
Templated version. Convert a value of type T.
func StrConv.convertAny | [src] |
Convert a value to an utf8 string, and append the result in a ConcatBuffer.
func StrConv.convertBool | [src] |
Convert a bool to a string, and put the result in a ConcatBuffer.
func StrConv.convertFloat | [src] |
Convert a float to an utf8 string, and put the result in a ConcatBuffer.
func StrConv.convertInt | [src] |
Convert an integer to an utf8 string, and put the result in a ConcatBuffer.
func StrConv.convertRune | [src] |
Convert a rune to a string, and put the result in a ConcatBuffer.
func StrConv.convertStruct | [src] |
Convert a structure content to an utf8 string, and put the result in a ConcatBuffer.
func StrConv.parseB64 | [src] |
Convert an utf8 buffer in binary to an unsigned integer value.
Returns the value and the number of bytes used to make the conversion. ovf will be true in case of overflow
func StrConv.parseBool | [src] |
Convert an utf8 buffer to a boolean.
Returns the value and the number of bytes used to make the conversion
func StrConv.parseF32 | [src] |
Convert an utf8 buffer to a floating point value.
Returns the value and the number of bytes used to make the conversion. ovf will be true in case of overflow
func StrConv.parseF64 | [src] |
func StrConv.parseIdentifier | [src] |
Parse an identifier name in the sens of swag (ascii).
func StrConv.parseRune | [src] |
Convert an utf8 buffer to a simple rune.
func StrConv.parseS16 | [src] |
func StrConv.parseS32 | [src] |
func StrConv.parseS64 | [src] |
func StrConv.parseS8 | [src] |
Convert an utf8 buffer to an signed integer value.
Returns the value and the number of bytes used to make the conversion. ovf will be true in case of overflow
func StrConv.parseString | [src] |
Convert an utf8 buffer to a String.
String in the buffer can be quoted (but the result will not be in that case)
func StrConv.parseU16 | [src] |
func StrConv.parseU32 | [src] |
func StrConv.parseU64 | [src] |
func StrConv.parseU8 | [src] |
Convert an utf8 buffer in decimal to an unsigned integer value.
Returns the value and the number of bytes used to make the conversion. ovf will be true in case of overflow
func StrConv.parseValue | [src] |
This function will parse the string buf and decode the corresponding value in addr.
addr must point to an initialized memory location that can hold type
Accepted types are :
buf can contain multiple values separated with blanks if type is:
func StrConv.parseX64 | [src] |
Convert an utf8 buffer in hexadecimal to an unsigned integer value.
Returns the value and the number of bytes used to make the conversion. ovf will be true in case of overflow
func StrConv.toDisplaySize | [src] |
Convert a size in a displayable format (with Kb, Mb and so on).
func StrConv.toF32 | [src] |
Transform a string to an f32.
func StrConv.toF64 | [src] |
Transform a string to an f64.
func StrConv.toNum | [src] |
Transform a string to an integer or float.
func StrConv.toS16 | [src] |
Transform a string to an s16.
func StrConv.toS32 | [src] |
Transform a string to an s32.
func StrConv.toS64 | [src] |
Transform a string to an s64.
func StrConv.toS8 | [src] |
Transform a string to an s8.
func StrConv.toU16 | [src] |
Transform a string to an u16.
func StrConv.toU32 | [src] |
Transform a string to an u32.
func StrConv.toU64 | [src] |
Transform a string to an u64.
func StrConv.toU8 | [src] |
Transform a string to an u8.
struct Core.String | [src] |
buffer | ^u8 | |
length | u64 | |
capacity | u64 | |
allocator | Swag.IAllocator | |
padding | [16] u8 |
append(self, rune) | Append a rune to the String. |
append(self, string) | Append a string to the String. |
append(self, u8) | Append a byte to the String. |
appendFormat | Append a formatted string. |
back | Get the last byte. |
clear | Set the length of the String to 0. |
contains(self, const [..] u8) | |
contains(self, rune) | |
contains(self, string) | |
contains(self, u8) | Returns true if the string contains what. |
ensureNotNull | Transform a null string in an empty one. |
from | Convert a literal string to a String. |
grow | Ensure the String is big enough to store a given amount of bytes. |
indexOf(self, rune, u64) | |
indexOf(self, string, u64, ComparisonType) | Find what, and returns the byte index of it. |
insert(self, u64, string) | Insert a substring at the given position. |
insert(self, u64, u8) | Insert an ascii byte at the given position. |
isEmpty | Returns true if the String has zero length. |
isNull | Returns true if the String is null (undefined). |
isNullOrEmpty | Returns true if the String is null or empty. |
join | Join a list of strings to make a unique one. |
joinWith | Join an list of strings to make a unique one, by using a given separator between them. |
makeLower | Convert the string inplace to lower case. |
makeUpper | Convert the string inplace to upper case. |
remove | Remove some bytes at the given index. |
removeBack | Remove some bytes at the end. |
replace(self, rune, string) | Replace all occurences of what with by. |
replace(self, string, string, ComparisonType) | Replace all occurences of what with by. |
reserve | Reserve room for at least newCapacity bytes. |
startsWith | Return true if the string starts with str. |
toLower(self, CharacterSet) | Returns a new String in lower case. |
toLower(string, CharacterSet) | Returns a new String in lower case. |
toRuneArray | Convert string to a 32 bits character array. |
toSlice(self) | Returns a slice type. |
toSlice(self) | Returns a slice type. |
toString | Returns a string type. |
toUpper(self, CharacterSet) | Returns a new String in upper case. |
toUpper(string, CharacterSet) | Returns a new String in lower case. |
trim | Removes all leading and trailing white-space characters from the current String. |
trimEnd | Remove whitespaces at the end of the String. |
trimStart | Remove whitespaces at the start of the String. |
opAffect | |
opAssign(self, const [..] rune) | |
opAssign(self, const [..] string) | |
opAssign(self, const [..] u8) | |
opAssign(self, rune) | |
opAssign(self, string) | |
opAssign(self, u8) | |
opCast(self) | |
opCast(self) | |
opCast(self) | |
opCmp | |
opCount | |
opData | |
opDrop | |
opEquals | |
opIndex | Returns the byte at the given index. |
opIndexAffect | |
opIndexAssign | |
opPostCopy | |
opPostMove | |
opSlice | |
opVisit | Default foreach, by bytes. |
opVisitBytes | Visit the String utf8 bytes. |
opVisitRunes | Visit the String runes See Utf8.visitRunes for aliases. |
func IHash32.compute | [src] |
func String.append | [src] |
Append a byte to the String.
Append a rune to the String.
Append a string to the String.
func String.appendFormat | [src] |
Append a formatted string.
func String.back | [src] |
Get the last byte.
func String.clear | [src] |
Set the length of the String to 0.
func String.contains | [src] |
Returns true if the string contains what.
func String.ensureNotNull | [src] |
Transform a null string in an empty one.
func String.from | [src] |
Convert a literal string to a String.
func String.grow | [src] |
Ensure the String is big enough to store a given amount of bytes.
func String.indexOf | [src] |
Find what, and returns the byte index of it.
func String.insert | [src] |
Insert an ascii byte at the given position.
Insert a substring at the given position.
func String.isEmpty | [src] |
Returns true if the String has zero length.
func String.isNull | [src] |
Returns true if the String is null (undefined).
func String.isNullOrEmpty | [src] |
Returns true if the String is null or empty.
func String.join | [src] |
Join a list of strings to make a unique one.
func String.joinWith | [src] |
Join an list of strings to make a unique one, by using a given separator between them.
func String.makeLower | [src] |
Convert the string inplace to lower case.
func String.makeUpper | [src] |
Convert the string inplace to upper case.
func String.opAffect | [src] |
func String.opAssign | [src] |
func String.opCast | [src] |
func String.opCmp | [src] |
func String.opCount | [src] |
func String.opData | [src] |
func String.opDrop | [src] |
func String.opEquals | [src] |
func String.opIndex | [src] |
Returns the byte at the given index.
func String.opIndexAffect | [src] |
func String.opIndexAssign | [src] |
func String.opPostCopy | [src] |
func String.opPostMove | [src] |
func String.opSlice | [src] |
func String.opVisit | [src] |
Default foreach, by bytes.
func String.opVisitBytes | [src] |
Visit the String utf8 bytes.
func String.opVisitRunes | [src] |
Visit the String runes See Utf8.visitRunes for aliases.
func String.remove | [src] |
Remove some bytes at the given index.
func String.removeBack | [src] |
Remove some bytes at the end.
func String.replace | [src] |
Replace all occurences of what with by.
func String.reserve | [src] |
Reserve room for at least newCapacity bytes.
func String.startsWith | [src] |
Return true if the string starts with str.
func String.toLower | [src] |
Returns a new String in lower case.
func String.toRuneArray | [src] |
Convert string to a 32 bits character array.
func String.toSlice | [src] |
Returns a slice type.
func String.toString | [src] |
Returns a string type.
func String.toUpper | [src] |
Returns a new String in upper case.
Returns a new String in lower case.
func String.trim | [src] |
Removes all leading and trailing white-space characters from the current String.
func String.trimEnd | [src] |
Remove whitespaces at the end of the String.
func String.trimStart | [src] |
Remove whitespaces at the start of the String.
namespace Core.Sync |
Event | |
Mutex | |
RWLock |
scopedLock | |
sharedLock |
struct Sync.Event | [src] |
handle | Win32.HANDLE |
create | Creates a new event. |
init | Initialize event. |
isValid | Returns true if the event is valid. |
release | Destroy an existing event. |
reset | Reset the event state. |
signal | Signal the event. |
wait | Wait for the event to be signaled. |
opDrop |
func Event.create | [src] |
Creates a new event.
func Event.init | [src] |
Initialize event.
func Event.isValid | [src] |
Returns true if the event is valid.
func Event.opDrop | [src] |
func Event.release | [src] |
Destroy an existing event.
func Event.reset | [src] |
Reset the event state.
func Event.signal | [src] |
Signal the event.
func Event.wait | [src] |
Wait for the event to be signaled.
struct Sync.Mutex | [src] |
v | Win32.SRWLOCK |
lock | Lock mutex. |
tryLock | Try to lock the mutex, and return true if it's the case. |
unlock | Unlock mutex. |
func Mutex.lock | [src] |
Lock mutex.
func Mutex.tryLock | [src] |
Try to lock the mutex, and return true if it's the case.
func Mutex.unlock | [src] |
Unlock mutex.
struct Sync.RWLock | [src] |
v | Win32.SRWLOCK |
lock | |
lockExclusive | Lock mutex. |
lockShared | Lock mutex. |
tryLockExclusive | Try to lock the mutex, and return true if it's the case. |
tryLockShared | Try to lock the mutex, and return true if it's the case. |
unlock | |
unlockExclusive | Unlock mutex. |
unlockShared | Unlock mutex. |
func RWLock.lock | [src] |
func RWLock.lockExclusive | [src] |
Lock mutex.
[src] |
Lock mutex.
func RWLock.tryLockExclusive | [src] |
Try to lock the mutex, and return true if it's the case.
[src] |
Try to lock the mutex, and return true if it's the case.
func RWLock.unlock | [src] |
func RWLock.unlockExclusive | [src] |
Unlock mutex.
[src] |
Unlock mutex.
func Sync.scopedLock | [src] |
[src] |
namespace Core.System |
pushContext | Push a new execution context for the given block of code. |
func System.pushContext | [src] |
Push a new execution context for the given block of code.
namespace Core.Threading |
Thread |
ThreadPriority |
wait | Wait multiple threads. |
struct Threading.Thread | [src] |
userLambda | func(Threading.Thread) | |
context | Swag.Context | |
userParam | *void | |
priority | Threading.ThreadPriority | |
handle | Threading.ThreadHandle | |
id | u32 | |
requestEnd | bool |
init | Initialize a thread in pause state. |
isDone | Returns true if the thread has finished. |
isValid | Returns true if the thread is valid. |
safeForceEnd | Force the thread to safely exist User code needs to check for requestEnd. |
setPriority | Set the thread priority. |
sleep | Sleep the current thread for a given amount of milliseconds. |
start | Resume the given thread, if it was paused. |
wait | Wait for the given thread to be done, and close it After that call, isValid() will return false. |
yield | Sleep the current thread for a given amount of milliseconds. |
opDrop |
func Thread.init | [src] |
Initialize a thread in pause state.
func Thread.isDone | [src] |
Returns true if the thread has finished.
func Thread.isValid | [src] |
Returns true if the thread is valid.
func Thread.opDrop | [src] |
func Thread.safeForceEnd | [src] |
Force the thread to safely exist User code needs to check for requestEnd.
func Thread.setPriority | [src] |
Set the thread priority.
func Thread.sleep | [src] |
Sleep the current thread for a given amount of milliseconds.
func Thread.start | [src] |
Resume the given thread, if it was paused.
func Thread.wait | [src] |
Wait for the given thread to be done, and close it After that call, isValid() will return false.
func Thread.yield | [src] |
Sleep the current thread for a given amount of milliseconds.
enum Threading.ThreadPriority | [src] |
Lowest | |
BelowNormal | |
Normal | |
AboveNormal | |
Highest |
func Threading.wait | [src] |
Wait multiple threads.
namespace Core.Time |
DateTime | Represents an instant in time, typically expressed as a date and time of day. |
Duration | Represents a delay, expressed in seconds. |
FrameTiming | |
Stopwatch | Provides a set of methods and properties that you can use to accurately measure elapsed time. |
TimeSpan | Represents an interval of time, stored as a 64 bits integer. |
Timer |
DateTimeFormat | |
DayOfWeek |
dateToTicks | Convert a date to a 64 bits value. |
daysInMonth | Returns the number of days of the given month, for the given year. |
isLeapYear | Returns true if the given year is a leap year. |
nowMicroseconds | Returns the current time expressed in microseconds. |
nowMilliseconds | Returns the current time expressed in milliseconds. |
nowPrecise | Get current time precise value. |
preciseFrequency | The frequency of the precise counter, in ticks per second. |
ticksToDate | Convert a 64 bits value to a date. |
ticksToTime | Convert a 64 bits tick value to a time. |
timeToTicks | Convert a time to a 64 bits value. |
struct Time.DateTime | [src] |
Represents an instant in time, typically expressed as a date and time of day.
year | u16 | |
month | u16 | |
day | u16 | |
hour | u16 | |
minute | u16 | |
second | u16 | |
millisecond | u16 |
dayOfWeek | Returns the day of week of the current date. |
dayOfWeekName | Returns the day of week name. |
isValid | Returns true if this is a valid datatime. |
monthName | Returns the month name. |
now | Returns a DateTime containing the current date and time. |
parse | Convert a string to a DateTime with the given format. |
setNow | Initialize the structure with the current local date and time. |
toString | Convert to string. |
opCmp | |
opEquals |
func IConvert.convert | [src] |
Used when printing a date with Core.Format.toString.
a | DateTimeFormat.DateTime |
b | DateTimeFormat.DateTimeMs |
c | DateTimeFormat.DateTimeIso |
d | DateTimeFormat.DateTimeIsoMs |
e | DateTimeFormat.DateTimeIsoHM |
f | DateTimeFormat.DateIso |
g | DateTimeFormat.TimeIso |
h | DateTimeFormat.TimeIsoMs |
i | DateTimeFormat.TimeIsoHM |
j | DateTimeFormat.Date' |
'swag let myDate = DateTime.now() Console.print(Format.toString("%{a}", myDate))
func ISerialize.postRead | [src] |
func ISerialize.read | [src] |
func ISerialize.readElement | [src] |
func ISerialize.write | [src] |
func ISerialize.writeElement | [src] |
func DateTime.dayOfWeek | [src] |
Returns the day of week of the current date.
func DateTime.dayOfWeekName | [src] |
Returns the day of week name.
func DateTime.isValid | [src] |
Returns true if this is a valid datatime.
func DateTime.monthName | [src] |
Returns the month name.
func DateTime.now | [src] |
Returns a DateTime containing the current date and time.
func DateTime.opCmp | [src] |
func DateTime.opEquals | [src] |
func DateTime.parse | [src] |
Convert a string to a DateTime with the given format.
func DateTime.setNow | [src] |
Initialize the structure with the current local date and time.
func DateTime.toString | [src] |
Convert to string.
enum Time.DateTimeFormat | [src] |
DateIso | YYYY-MM-DD. |
TimeIso | HH:MM:SS. |
TimeIsoMs | HH:MM:SS.ZZZ. |
TimeIsoHM | HH:MM. |
Date | DAYOFWEEK MONTH DAY YYYY. |
DateTime | DAYOFWEEK MONTH DAY YYYY HH:MM:SS. |
DateTimeMs | DAYOFWEEK MONTH DAY YYYY HH:MM:SS.ZZZ. |
DateTimeIso | YYYY-MM-DD HH:MM:SS. |
DateTimeIsoMs | YYYY-MM-DD HH:MM:SS.ZZZ. |
DateTimeIsoHM | YYYY-MM-DD HH:MM. |
enum Time.DayOfWeek | [src] |
Sunday | |
Monday | |
Tuesday | |
Wednesday | |
Thursday | |
Friday | |
Saturday |
struct Time.Duration | [src] |
Represents a delay, expressed in seconds.
timeInSeconds | f32 | The duration in seconds. |
fromMs | Returns a duration initialized with milliseconds. |
toMs | Returns the value in milliseconds. |
opAffect | |
opAffectLiteral |
func Duration.fromMs | [src] |
Returns a duration initialized with milliseconds.
func Duration.opAffect | [src] |
func Duration.opAffectLiteral | [src] |
func Duration.toMs | [src] |
Returns the value in milliseconds.
struct Time.FrameTiming | [src] |
dtMin | f32 | |
dtMax | f32 | |
dt | f32 | Current delta time, in seconds. |
frameCount | u32 | Frame counter. |
prevTick | u64 | |
paused | bool |
pause | Pause frame timing & count. |
unpause | Unpause frame timing & count. |
update | Update frame timers. |
func FrameTiming.pause | [src] |
Pause frame timing & count.
func FrameTiming.unpause | [src] |
Unpause frame timing & count.
func FrameTiming.update | [src] |
Update frame timers.
struct Time.Stopwatch | [src] |
Provides a set of methods and properties that you can use to accurately measure elapsed time.
isStarted | bool | |
startTimeStamp | u64 | |
elapsedTicks | u64 |
elapsedMicroseconds | Gets the total elapsed time in microseconds, after a call to stop. |
elapsedMicrosecondsNow | Gets the current elapsed time in milliseconds since the start. |
elapsedMilliseconds | Gets the total elapsed time in milliseconds, after a call to stop. |
elapsedMillisecondsNow | Gets the current elapsed time in milliseconds since the start. |
reset | Stops time interval measurement and resets the elapsed time to zero. |
restart | Stops time interval measurement, resets the elapsed time to zero, and starts measuring elapsed time. |
scopeMeasure | Measure until the end of the scope, and print the result in the console. |
start | Starts, or resumes, measuring elapsed time for an interval. |
stop | Stops measuring elapsed time for an interval. |
func Stopwatch.elapsedMicroseconds | [src] |
Gets the total elapsed time in microseconds, after a call to stop.
func Stopwatch.elapsedMicrosecondsNow | [src] |
Gets the current elapsed time in milliseconds since the start.
func Stopwatch.elapsedMilliseconds | [src] |
Gets the total elapsed time in milliseconds, after a call to stop.
func Stopwatch.elapsedMillisecondsNow | [src] |
Gets the current elapsed time in milliseconds since the start.
func Stopwatch.reset | [src] |
Stops time interval measurement and resets the elapsed time to zero.
func Stopwatch.restart | [src] |
Stops time interval measurement, resets the elapsed time to zero, and starts measuring elapsed time.
func Stopwatch.scopeMeasure | [src] |
Measure until the end of the scope, and print the result in the console.
func Stopwatch.start | [src] |
Starts, or resumes, measuring elapsed time for an interval.
func Stopwatch.stop | [src] |
Stops measuring elapsed time for an interval.
struct Time.TimeSpan | [src] |
Represents an interval of time, stored as a 64 bits integer.
ticks | Time.Ticks |
addDays | Add or remove the given amount of days to the TimeSpan. |
addHours | Add or remove the given amount of hours to the TimeSpan. |
addMilliSeconds | Add or remove the given amount of minutes to the TimeSpan. |
addMinutes | Add or remove the given amount of minutes to the TimeSpan. |
addMonths | Add or remove the given amount of months to the TimeSpan. |
addSeconds | Add or remove the given amount of minutes to the TimeSpan. |
addYears | Add or remove the given amount of years to the TimeSpan. |
from | Creates a TimeSpan with the given DateTime. |
now | Returns the current date and time. |
setNow | Initialize the TimeSpan with the current date and time. |
toDateTime | Converts a TimeSpan to a DateTime. |
totalDays | |
totalHours | |
totalMilliSeconds | |
totalMinutes | |
totalSeconds |
opCmp |
func TimeSpan.addDays | [src] |
Add or remove the given amount of days to the TimeSpan.
func TimeSpan.addHours | [src] |
Add or remove the given amount of hours to the TimeSpan.
func TimeSpan.addMilliSeconds | [src] |
Add or remove the given amount of minutes to the TimeSpan.
func TimeSpan.addMinutes | [src] |
Add or remove the given amount of minutes to the TimeSpan.
func TimeSpan.addMonths | [src] |
Add or remove the given amount of months to the TimeSpan.
func TimeSpan.addSeconds | [src] |
Add or remove the given amount of minutes to the TimeSpan.
func TimeSpan.addYears | [src] |
Add or remove the given amount of years to the TimeSpan.
func TimeSpan.from | [src] |
Creates a TimeSpan with the given DateTime.
func TimeSpan.now | [src] |
Returns the current date and time.
func TimeSpan.opCmp | [src] |
func TimeSpan.setNow | [src] |
Initialize the TimeSpan with the current date and time.
func TimeSpan.toDateTime | [src] |
Converts a TimeSpan to a DateTime.
func TimeSpan.totalDays | [src] |
func TimeSpan.totalHours | [src] |
func TimeSpan.totalMilliSeconds | [src] |
func TimeSpan.totalMinutes | [src] |
func TimeSpan.totalSeconds | [src] |
struct Time.Timer | [src] |
userLambda | func(Time.Timer) | |
handle | Time.TimerHandle | |
context | Swag.Context |
create | Creates a new timer. |
init | Initialize timer. |
release | Release the timer. |
func Timer.create | [src] |
Creates a new timer.
func Timer.init | [src] |
Initialize timer.
func Timer.release | [src] |
Release the timer.
func Time.dateToTicks | [src] |
Convert a date to a 64 bits value.
func Time.daysInMonth | [src] |
Returns the number of days of the given month, for the given year.
func Time.isLeapYear | [src] |
Returns true if the given year is a leap year.
func Time.nowMicroseconds | [src] |
Returns the current time expressed in microseconds.
func Time.nowMilliseconds | [src] |
Returns the current time expressed in milliseconds.
func Time.nowPrecise | [src] |
Get current time precise value.
func Time.preciseFrequency | [src] |
The frequency of the precise counter, in ticks per second.
func Time.ticksToDate | [src] |
Convert a 64 bits value to a date.
func Time.ticksToTime | [src] |
Convert a 64 bits tick value to a time.
func Time.timeToTicks | [src] |
Convert a time to a 64 bits value.
namespace Core.Tokenize |
eatCount | Eat count bytes, and returns the remaining string. |
eatQuotes | Remove "". |
eatSpaces | Eat all spaces, and returns the remaining string (trim left). |
getTo | Returns a sub string starting at startByteIndex and ending with delimiter. |
getToSpace | Returns the first substring of str stopping at the first blank character. |
getWhileAlnum | Returns the first substring of str containing only digits and letters. |
split(string, rune, u32, bool) | Split string into sub strings, given a rune separator Note that this returns an array of native strings, not copies. All strings will be invalid if src is destroyed. |
split(string, string, u32, bool) | Split string into sub strings, given a string separator Note that this returns an array of native strings, not copies. All strings will be invalid if src String is destroyed. |
split(string, u8, u32, bool) | Split string into sub strings, given a byte separator Note that this returns an array of native strings, not copies. All strings will be invalid if src String is destroyed. |
splitAny | Split string into sub strings, given an array of rune separators Note that this returns an array of native strings, not copies. All strings will be invalid if src String is destroyed. |
splitLines | Split the string into an array of lines Note that this returns an array of native strings, not copies. All strings will be invalid if src is destroyed. |
func Tokenize.eatCount | [src] |
Eat count bytes, and returns the remaining string.
func Tokenize.eatQuotes | [src] |
Remove "".
func Tokenize.eatSpaces | [src] |
Eat all spaces, and returns the remaining string (trim left).
func Tokenize.getTo | [src] |
Returns a sub string starting at startByteIndex and ending with delimiter.
func Tokenize.getToSpace | [src] |
Returns the first substring of str stopping at the first blank character.
func Tokenize.getWhileAlnum | [src] |
Returns the first substring of str containing only digits and letters.
func Tokenize.split | [src] |
Split string into sub strings, given a byte separator Note that this returns an array of native strings, not copies. All strings will be invalid if src String is destroyed.
Split string into sub strings, given a string separator Note that this returns an array of native strings, not copies. All strings will be invalid if src String is destroyed.
Split string into sub strings, given a rune separator Note that this returns an array of native strings, not copies. All strings will be invalid if src is destroyed.
func Tokenize.splitAny | [src] |
Split string into sub strings, given an array of rune separators Note that this returns an array of native strings, not copies. All strings will be invalid if src String is destroyed.
func Tokenize.splitLines | [src] |
Split the string into an array of lines Note that this returns an array of native strings, not copies. All strings will be invalid if src is destroyed.
struct Core.UUID | [src] |
using uuid | {val8:[16] u8,val64:[2] u64} |
clear | Clear id. |
getRandom | Get a version 4 UUID (random). |
toString(self) | Convert uuid to a string. |
toString(self, [..] u8) | Convert uuid to a string of the form xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx. |
opEquals |
func IConvert.convert | [src] |
func IHash32.compute | [src] |
func UUID.clear | [src] |
Clear id.
func UUID.getRandom | [src] |
Get a version 4 UUID (random).
func UUID.opEquals | [src] |
func UUID.toString | [src] |
Convert uuid to a string of the form xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx.
Convert uuid to a string.
namespace Core.Unicode |
fromUtf8([..] rune, const [..] u8) | Convert an utf8 buffer to a character sequence, and returns the number of valid elements in the destination buffer. |
fromUtf8(const [..] u8) | Convert an utf8 buffer to a character sequence. |
isAscii | |
isControl | |
isDigit | |
isLatin1 | |
isLetter | |
isLetterOrDigit | |
isLower | |
isNumber | |
isSpace | |
isSymbol | |
isSymbolMath | |
isTitle | |
isUpper | |
isWord | |
makeLower | Make a rune buffer lower case. |
makeUpper | Make a rune buffer upper case. |
toLower | |
toTitle | |
toUpper |
func Unicode.fromUtf8 | [src] |
Convert an utf8 buffer to a character sequence, and returns the number of valid elements in the destination buffer.
Convert an utf8 buffer to a character sequence.
func Unicode.isAscii | [src] |
func Unicode.isControl | [src] |
func Unicode.isDigit | [src] |
func Unicode.isLatin1 | [src] |
func Unicode.isLetter | [src] |
func Unicode.isLetterOrDigit | [src] |
func Unicode.isLower | [src] |
func Unicode.isNumber | [src] |
func Unicode.isSpace | [src] |
func Unicode.isSymbol | [src] |
func Unicode.isSymbolMath | [src] |
func Unicode.isTitle | [src] |
func Unicode.isUpper | [src] |
func Unicode.isWord | [src] |
func Unicode.makeLower | [src] |
Make a rune buffer lower case.
func Unicode.makeUpper | [src] |
Make a rune buffer upper case.
func Unicode.toLower | [src] |
func Unicode.toTitle | [src] |
func Unicode.toUpper | [src] |
namespace Core.Utf16 |
decodeRune | Get the unicode character pointed by buffer, and the number of u16 to encode it Will return RuneError for an invalid utf16 sequence. |
encodeRune | Convert unicode character src to an utf16 sequence, and returns the number of u16 that were needed to make the conversion. dest must be at least 2 u16 long. |
fromUnicode([..] u16, const [..] rune) | Convert a character array (32 bits unicode) to an utf16 buffer Returns the number of bytes written in the destination buffer dest must be at least 2 bytes long. |
fromUnicode(const [..] rune) | Convert a character array (32 bits unicode) to an utf16 sequence. |
fromUtf8([..] u16, const [..] u8) | Convert an utf8 buffer to a utf16 buffer, and returns the number of valid elements in the destination buffer. |
fromUtf8(const [..] u8) | Convert an utf8 buffer to an utf16 sequence. |
lengthZeroTerminated | Compute the string length of a zero terminated utf16 buffer. |
toZeroTerminated | Convert string to an utf16 array, zero terminated. |
func Utf16.decodeRune | [src] |
Get the unicode character pointed by buffer, and the number of u16 to encode it Will return RuneError for an invalid utf16 sequence.
func Utf16.encodeRune | [src] |
Convert unicode character src to an utf16 sequence, and returns the number of u16 that were needed to make the conversion. dest must be at least 2 u16 long.
func Utf16.fromUnicode | [src] |
Convert a character array (32 bits unicode) to an utf16 buffer Returns the number of bytes written in the destination buffer dest must be at least 2 bytes long.
Convert a character array (32 bits unicode) to an utf16 sequence.
func Utf16.fromUtf8 | [src] |
Convert an utf8 buffer to a utf16 buffer, and returns the number of valid elements in the destination buffer.
Convert an utf8 buffer to an utf16 sequence.
func Utf16.lengthZeroTerminated | [src] |
Compute the string length of a zero terminated utf16 buffer.
func Utf16.toZeroTerminated | [src] |
Convert string to an utf16 array, zero terminated.
namespace Core.Utf8 |
ComparisonType |
beautifyName | |
byteIndex | Returns the byte index of the given rune index. |
compare | Compare two utf8 buffers with the given algorithm. |
contains(const [..] u8, const [..] u8) | Returns true if src contains the slice what. |
contains(const [..] u8, rune) | Returns true if src contains the string what. |
contains(const [..] u8, string) | Returns true if src contains the string what. |
contains(const [..] u8, u8) | Returns true if src contains the string what. |
countBytesAt | Returns the number of bytes to encode the first rune of the utf8 buffer. |
countRunes | Returns the number of runes in an utf8 buffer. |
decodeLastRune | Get the last unicode rune of the utf8 slice, and the number of bytes to encode it. |
decodeRune | Get the unicode rune pointed by buffer, and the number of bytes to encode it. |
encodeRune | Convert rune src to an utf8 sequence, and returns the number of bytes that were needed to make the conversion. |
endsWith | Return true if the string ends with str. |
firstRune | Returns the first rune of the slice. |
fromUnicode([..] u8, const [..] rune) | Convert a rune array to an utf8 buffer. |
fromUnicode(const [..] rune) | Convert an unicode buffer to a String. |
fromUtf16([..] u8, const [..] u16) | Convert an utf16 array to an utf8 buffer. |
fromUtf16(const [..] u16) | Convert an utf16 buffer to a String. |
indexOf(const [..] u8, rune, u64) | Find the first occurence of rune what, and returns the byte index of it. |
indexOf(const [..] u8, string, u64, ComparisonType) | Find the given string, and returns the byte index of it. |
indexOfAny(const [..] u8, const [..] rune, u64) | Find one of the runes in what, and returns the byte index of it. |
indexOfAny(const [..] u8, const [..] u8, u64) | Find one of the runes in what, and returns the byte index of it. |
isValid | Returns true if the utf8 sequence is valid. |
isValidRune | Returns true if the given unicode rune can be encoded in utf8. |
lastIndexOf(const [..] u8, rune) | Find the last rune occurence of what, and returns the byte index of it. |
lastIndexOf(const [..] u8, string, ComparisonType) | Returns the last index (in bytes) of a string. |
lastIndexOfAny(const [..] u8, const [..] rune) | Returns the last index (in bytes) of a any of the runes in what. |
lastIndexOfAny(const [..] u8, const [..] u8) | Returns the last index (in bytes) of a any of the bytes in what. |
lastRune | Returns the last rune of the slice. |
startsWith | Return true if the string starts with str. |
visitRunes | Macro to foreach the unicode characters of the utf8 sequence. |
enum Utf8.ComparisonType | [src] |
Latin1 | |
Latin1NoCase | |
Unicode | |
UnicodeNoCase |
func Utf8.beautifyName | [src] |
func Utf8.byteIndex | [src] |
Returns the byte index of the given rune index.
func Utf8.compare | [src] |
Compare two utf8 buffers with the given algorithm.
func Utf8.contains | [src] |
Returns true if src contains the string what.
Returns true if src contains the slice what.
func Utf8.countBytesAt | [src] |
Returns the number of bytes to encode the first rune of the utf8 buffer.
If it's an invalid encoding, returns 1.
func Utf8.countRunes | [src] |
Returns the number of runes in an utf8 buffer.
func Utf8.decodeLastRune | [src] |
Get the last unicode rune of the utf8 slice, and the number of bytes to encode it.
func Utf8.decodeRune | [src] |
Get the unicode rune pointed by buffer, and the number of bytes to encode it.
Will return RuneError for an invalid utf8 sequence
func Utf8.encodeRune | [src] |
Convert rune src to an utf8 sequence, and returns the number of bytes that were needed to make the conversion.
dest must be at least 4 bytes long
func Utf8.endsWith | [src] |
Return true if the string ends with str.
func Utf8.firstRune | [src] |
Returns the first rune of the slice.
func Utf8.fromUnicode | [src] |
Convert a rune array to an utf8 buffer.
Returns the number of bytes written in the destination buffer dest must be at least 4 bytes long
Convert an unicode buffer to a String.
func Utf8.fromUtf16 | [src] |
Convert an utf16 array to an utf8 buffer.
Returns the number of bytes written in the destination buffer. dest must be at least 4 bytes long
Convert an utf16 buffer to a String.
func Utf8.indexOf | [src] |
Find the first occurence of rune what, and returns the byte index of it.
Returns Swag.U64.Max if not found
Find the given string, and returns the byte index of it.
func Utf8.indexOfAny | [src] |
Find one of the runes in what, and returns the byte index of it.
Returns Swag.U64.Max if not found
Find one of the runes in what, and returns the byte index of it.
func Utf8.isValid | [src] |
Returns true if the utf8 sequence is valid.
func Utf8.isValidRune | [src] |
Returns true if the given unicode rune can be encoded in utf8.
func Utf8.lastIndexOf | [src] |
Find the last rune occurence of what, and returns the byte index of it.
Returns Swag.U64.Max if not found
Returns the last index (in bytes) of a string.
Returns Swag.U64.Max if not found
func Utf8.lastIndexOfAny | [src] |
Returns the last index (in bytes) of a any of the runes in what.
Returns Swag.U64.Max if not found
Returns the last index (in bytes) of a any of the bytes in what.
Returns Swag.U64.Max if not found
func Utf8.lastRune | [src] |
Returns the last rune of the slice.
func Utf8.startsWith | [src] |
Return true if the string starts with str.
func Utf8.visitRunes | [src] |
Macro to foreach the unicode characters of the utf8 sequence.
func Core.add | [src] |
func Core.equals | [src] |
func Core.has | [src] |
func Core.orderMaxMin | [src] |
Be sure that a is geater or equal than b.
func Core.orderMinMax | [src] |
Be sure that a is lower or equal than b.
func Core.remove | [src] |
func Core.set | [src] |
func Core.swap | [src] |
Swap two values.
func Core.toggle | [src] |