src/misc/util

Search:
Group by:
Source   Edit  

Types

CatchableAssertion = object of CatchableError
Source   Edit  

Procs

proc `+`[T, U](a: Option[T]; b: Option[U]): Option[T]
Source   Edit  
proc `-`[T, U](a: Option[T]; b: Option[U]): Option[T]
Source   Edit  
proc `??`[T: ref object](self: T; els: T): T
Source   Edit  
proc align[T](address, alignment: T): T
Source   Edit  
proc del[T](x: var seq[T]; val: T) {.noSideEffect.}
Source   Edit  
proc first=[S, T](x: var S; value: T)
Source   Edit  
proc last=[S, T](x: var S; value: T)
Source   Edit  
func myNormalizedPath(path: string): string {....raises: [], tags: [], forbids: [].}
Source   Edit  
proc neww[T](value: T): ref T
Source   Edit  
proc `or`[T, U](a: Option[T]; b: Option[U]): Option[T]
Source   Edit  
proc resetOption[T](self: var Option[T])
Source   Edit  
func roundPositive[T: float64 | float32](x: T): T
Source   Edit  
proc safeIntCast[T: SomeSignedInt](x: T; Target: typedesc[SomeUnsignedInt]): Target:type {.
    inline.}
Cast signed integer to unsigned integer. Same as castTarget, but on js backend doesn't use BigInt Source   Edit  
proc someOption[T: not Option](self: T): Option[T]
Source   Edit  
proc someOption[T: Option](self: T): T
Source   Edit  

Macros

macro `.?`(self: untyped; value: untyped): untyped
Source   Edit  

Templates

template catch(exp: untyped; error: untyped; then: untyped): untyped
Source   Edit  
template catch(exp: untyped; then: untyped): untyped
Source   Edit  
template first(x: untyped): untyped
Source   Edit  
template getOr[T](opt: Option[T]; body: untyped): T
Source   Edit  
template getSome[T](opt: Option[T]; injected: untyped): bool
Source   Edit  
template hasPrefix(exp: untyped; prefix: string; v: untyped): untyped
Source   Edit  
template isNotNil(v: untyped): untyped
Source   Edit  
template isNotNil(v: untyped; injected: untyped): bool
Source   Edit  
template last(x: untyped): untyped
Source   Edit  
template mapIt[T](self: Option[T]; op: untyped): untyped
Source   Edit  
template maybeFlatten[T](self: Option[Option[T]]): Option[T]
Source   Edit  
template maybeFlatten[T](self: Option[T]): Option[T]
Source   Edit  
template softAssert(condition: bool; message: string): untyped
Source   Edit  
template toOpenArray(s: string): auto
Source   Edit  
template with(exp, val, body: untyped): untyped
Source   Edit  
template yieldAll(iter: untyped): untyped
Source   Edit