Logo GenPRES

HashId Module

Creates, cleans and reads a HashId.

Functions and values

Function or value Description

HashId.create s

Full Usage: HashId.create s

Parameters:
    s : string

Returns: HashId

Cleans a text from a sheet into a HashId: trims it, removes a leading apostrophe, with which a sheet marks a value as text, and makes it lower case. A text that is then not a hash gives the empty HashId, such as a hash that a sheet has turned into a number.

s : string
Returns: HashId

HashId.empty

Full Usage: HashId.empty

Returns: HashId

A HashId that is not calculated yet.

Returns: HashId

HashId.isHash s

Full Usage: HashId.isHash s

Parameters:
    s : string

Returns: bool

Whether a text is a hash: 12 lowercase hexadecimal characters.

s : string
Returns: bool

HashId.ofFields fields

Full Usage: HashId.ofFields fields

Parameters:
    fields : string list

Returns: HashId

Hashes the fields into a HashId.

fields : string list
Returns: HashId

HashId.toString arg1

Full Usage: HashId.toString arg1

Parameters:
Returns: string

Returns the hash as text, or an empty text for the empty HashId.

arg0 : HashId
Returns: string

Type something to start searching.