Header menu logo ResizeArray

UtilResizeArray Module

Types

Type Description

DebugIndexer<'T>

A simple simple Wrapper for a ResizeArray. The sole purpose is to provide a better Exception message when an index is out of range.

Functions and values

Function or value Description

badGetExn i arr funcName

Full Usage: badGetExn i arr funcName

Parameters:
    i : int
    arr : ResizeArray<'T>
    funcName : string

Returns: 'a

Throws an IndexOutOfRangeException for getting a bad index with a message that includes the content of the ResizeArray.

i : int
arr : ResizeArray<'T>
funcName : string
Returns: 'a

badSetExn i arr funcName doingSet

Full Usage: badSetExn i arr funcName doingSet

Parameters:
    i : int
    arr : ResizeArray<'T>
    funcName : string
    doingSet : 'T

Returns: 'a

Throws an IndexOutOfRangeException for setting a bad index with a message that includes the content of the ResizeArray.

i : int
arr : ResizeArray<'T>
funcName : string
doingSet : 'T
Returns: 'a

contentAsString entriesToPrint arr

Full Usage: contentAsString entriesToPrint arr

Parameters:
    entriesToPrint : int
    arr : ResizeArray<'T>

Returns: string

Returns a string with the content of the ResizeArray up to 'entriesToPrint' entries. Includes the index of each entry. Includes the last entry.

entriesToPrint : int
arr : ResizeArray<'T>
Returns: string

debugTxt i

Full Usage: debugTxt i

Parameters:
    i : int option

Returns: string
Modifiers: inline
i : int option
Returns: string

fail arr funcAndReason

Full Usage: fail arr funcAndReason

Parameters:
    arr : ResizeArray<'T>
    funcAndReason : string

Returns: 'a

Throws an ArgumentException with a message that includes the content of the ResizeArray.

arr : ResizeArray<'T>
funcAndReason : string
Returns: 'a

failIdx arr funcAndReason

Full Usage: failIdx arr funcAndReason

Parameters:
    arr : ResizeArray<'T>
    funcAndReason : string

Returns: 'a

Throws an IndexOutOfRangeException with a message that includes the content of the ResizeArray.

arr : ResizeArray<'T>
funcAndReason : string
Returns: 'a

failKey arr funcAndReason

Full Usage: failKey arr funcAndReason

Parameters:
    arr : ResizeArray<'T>
    funcAndReason : string

Returns: 'a

Throws a KeyNotFoundException with a message that includes the content of the ResizeArray.

arr : ResizeArray<'T>
funcAndReason : string
Returns: 'a

failSimpel funcAndReason

Full Usage: failSimpel funcAndReason

Parameters:
    funcAndReason : string

Returns: 'a

Throws an ArgumentException with.

funcAndReason : string
Returns: 'a

negIdx i len

Full Usage: negIdx i len

Parameters:
    i : int
    len : int

Returns: int
Modifiers: inline

Converts negative indices to positive ones. Correct results from -length up to length-1 e.g.: -1 is last item . (from the release of F# 5 on a negative index can also be done with '^' prefix. E.g. ^0 for the last item)

i : int
len : int
Returns: int

negIdxLooped i length

Full Usage: negIdxLooped i length

Parameters:
    i : int
    length : int

Returns: int
Modifiers: inline

Any int will give a valid index for given collection size. Converts negative indices to positive ones and loops to start after last index is reached. Returns a valid index for a collection of 'length' items for any integer

i : int
length : int
Returns: int

nullExn funcName

Full Usage: nullExn funcName

Parameters:
    funcName : string

Returns: 'a

Throws an ArgumentNullException with a message that includes the function name.

funcName : string
Returns: 'a

toStringCore ofType arr

Full Usage: toStringCore ofType arr

Parameters:
    ofType : 'a
    arr : ResizeArray<'T>

Returns: string
Modifiers: inline
Type parameters: 'a, 'T
ofType : 'a
arr : ResizeArray<'T>
Returns: string

toStringInline arr

Full Usage: toStringInline arr

Parameters:
    arr : ResizeArray<'T>

Returns: string
Modifiers: inline
Type parameters: 'T
arr : ResizeArray<'T>
Returns: string

typeOfName ()

Full Usage: typeOfName ()

Parameters:
    () : unit

Returns: string
Modifiers: inline
Type parameters: 'T
() : unit
Returns: string

Type something to start searching.