System.NetEncoding.TSqidsEncoding.Create
Delphi
constructor Create(const AAlphabet: string = ''; AMinHashLength: Integer = 0;
const ABlockList: TArray<string> = nil);
C++
__fastcall TSqidsEncoding(const System::UnicodeString AAlphabet, int AMinHashLength, const System::DynamicArray<System::UnicodeString> ABlockList);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
constructor | public | System.NetEncoding.pas System.NetEncoding.hpp |
System.NetEncoding | TSqidsEncoding |
Description
Creates a new instance of TSqidsEncoding.
Create accepts the following parameters:
AAlphabet
: An optional encoding alphabet. The default value is an empty string, which leads to the use of Sqids default alphabet ("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789").AMinHashLength
: A minimum string length for the encoded value. The default value is0
, i.e., it has no lower limit.ABlockList
: A list of blocked strings for the encoded values. The default value is an empty array, which leads to using a list of known swear words that might not be appropriate to show up in auto-generated Sqids IDs accidentally.