in multimethod
Methods
- in(symbol:Str, lib:CLib)
Unfinished feature. Don't use!
- in(field:Str, obj:NormalTypeInstance)
Check whether NormalType (a type that is typically defined by user) instance has the given field. Automatically called by NGS for syntax
field in obj
Returns
BoolExample
type T; t=T(); t.x=1; "x" in t # true
- in(x:Any, h:Hash)
Check key presence in a Hash Returns
BoolExample
"a" in {"a": 1} # true "b" in {"a": 1} # false
- in(x:Any, e:Eachable1) Source: stdlib.ngs:610
Checks whether element x is in Eachable1 Parameters
x Needle e Haystack Returns
BoolExample
1 in [1,2,3].Iter() # true 10 in [1,2,3].Iter() # false
- in(k:Any, hl:HashLike) Source: stdlib.ngs:684
Check whether k is in the HashLike Returns
Bool
- in(n:Int, r:NumRange) Source: stdlib.ngs:1227
Check whether the number is in range 10 in 10..20 # true 1 in 10..20 # false
- in(x:Any, arr:Arr) Source: stdlib.ngs:1497
Checks whether element x is in array arr Parameters
x Needle arr Haystack Returns
BoolExample
1 in [1,2,3] # true 10 in [1,2,3] # false
- in(needle:Str, haystack:Str) Source: stdlib.ngs:3280
Determine if needle substring occurs at least once in haystack Parameters
needle The string to find haystack The string to search in Returns
BoolExample
"bc" in "abcd" "x" not in "abcd"
- in(x:Any, s:Set) Source: autoload/Set.ngs:36
Check if the value is in the set Returns
Bool