// Path: src/main/java/uk/org/okapibarcode/util/Arrays.java
// public static int positionOf(char value, char[] array) {
//     for (int i = 0; i < array.length; i++) {
//         if (value == array[i]) {
//             return i;
//         }
//     }
//     throw new OkapiException("Unable to find character '" + value + "' in character array.");
// }


import static uk.org.okapibarcode.util.Arrays.positionOf;

     * @param stopDelimiter an optional stop delimiter to be shown in the human-readable text
     */
    public void setStopDelimiter(Character stopDelimiter) {
        this.stopDelimiter = stopDelimiter;
    }

    /**
     * Returns the optional stop delimiter to be shown in the human-readable text.
     *
     * @return the optional stop delimiter to be shown in the human-readable text
     */
    public Character getStopDelimiter() {
        return stopDelimiter;
    }

    /** {@inheritDoc} */
    @Override
    protected void encode() {

        if (!content.matches("[0-9-]+")) {
            throw new OkapiException("Invalid characters in input");
        }

        String horizontalSpacing = "112211";
        String humanReadable = content;
        int length = content.length();
        int[] weight = new int[length + 1];

        for (int i = 0; i < length; i++) {
            char c = content.charAt(i);

// Path: src/main/java/uk/org/okapibarcode/util/Arrays.java
// public static int positionOf(char value, char[] array) {
//     for (int i = 0; i < array.length; i++) {
//         if (value == array[i]) {
//             return i;
//         }
//     }
//     throw new OkapiException("Unable to find character '" + value + "' in character array.");
// }


// Path: src/main/java/uk/org/okapibarcode/backend/Code11.java
import static uk.org.okapibarcode.util.Arrays.positionOf;

     * @param stopDelimiter an optional stop delimiter to be shown in the human-readable text
     */
    public void setStopDelimiter(Character stopDelimiter) {
        this.stopDelimiter = stopDelimiter;
    }

    /**
     * Returns the optional stop delimiter to be shown in the human-readable text.
     *
     * @return the optional stop delimiter to be shown in the human-readable text
     */
    public Character getStopDelimiter() {
        return stopDelimiter;
    }

    /** {@inheritDoc} */
    @Override
    protected void encode() {

        if (!content.matches("[0-9-]+")) {
            throw new OkapiException("Invalid characters in input");
        }

        String horizontalSpacing = "112211";
        String humanReadable = content;
        int length = content.length();
        int[] weight = new int[length + 1];

        for (int i = 0; i < length; i++) {
            char c = content.charAt(i);

            weight[i] = positionOf(c, CHARACTER_SET);
