toJEncodedCell

Converts an integer representing a Sudoku cell value to its J-Encoded string representation.

Example:

5.toJEncodedCell() // Returns JEncodedCell("E")
10.toJEncodedCell() // Returns JEncodedCell("Aj")

Receiver

The integer representing the Sudoku cell value.

Return

The JEncodedCell string representation of the cell, using letters 'a' to 'j' (where 'j' is used for 0), and capitalizing the first letter.


Converts a string representation to a JEncodedCell.

This function wraps a string into a JEncodedCell, which is a value class used for representing Sudoku cell values in their J-Encoded string format. The conversion is straightforward as it simply creates an instance of JEncodedCell with the provided string.

Example:

val cellString = "A" // Represents a J-Encoded cell value

// Convert the string to a JEncodedCell
val encodedCell: JEncodedCell = cellString.toJEncodedCell()

Receiver

The string representation of the Sudoku cell.

Return

A JEncodedCell instance initialized with the string.