Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion src/Ascii.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,17 @@
/**
* @see https://datatracker.ietf.org/doc/html/rfc20
*
* @todo upgrade to PHP 8.2 and move values to cases
* @todo upgrade to PHP 8.2, move values to cases and move `values of cases` region under `groups of cases` region
*/
enum Ascii: string
{
#region values of cases
public const FILE_SEPARATOR = "\x1C";
public const GROUP_SEPARATOR = "\x1D";
public const NULL = "\x00";
public const RECORD_SEPARATOR = "\x1E";
public const UNIT_SEPARATOR = "\x1F";
#endregion

/**
* Separates different files (databases)
Expand All @@ -35,6 +37,18 @@ enum Ascii: string
*/
case UnitSeparator = self::UNIT_SEPARATOR;

#region groups of cases
/**
* Used to separate and qualify information in a logical sense
*/
public const INFORMATION_SEPARATORS = [
self::FileSeparator,
self::GroupSeparator,
self::RecordSeparator,
self::UnitSeparator,
];
#endregion

/**
* @see implode()
*/
Expand Down
Loading