<?php

class ExcelUtil
{
    static public function parseValue($value)
    {
        if (!empty($value)) {
            $value = utf8_encode($value);
            if (strpos($value, "=") === 0) {
                $value = str_replace("=", "⹀", $value);
            }
        } else {
            $value = "-";
        }

        return $value;
    }

    static public function parseId($value)
    {
        $value = (string) $value;
        if (mb_detect_encoding($value) == "UTF-8") {
            $value = utf8_decode($value);
        }
        $unaccents = Util::unaccents($value);
        $lower = strtolower($unaccents);

        return "00000" . Util::camelize($lower);
    }
}
