"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const checkUniqueChar = (str, char) => {
  let firstAppear = true;
  return str.split("").map((c) => {
    if (c === char) {
      if (firstAppear) {
        firstAppear = false;
        return char;
      } else {
        return "";
      }
    }
    return c;
  }).join("");
};
const decimalPlacesLimit = (str, place) => {
  if (place === 0 && str.includes(".")) {
    return false;
  }
  const splitStr = str.split(".");
  if (splitStr[1] && splitStr[1].length > place) {
    return false;
  }
  return true;
};
exports.checkUniqueChar = checkUniqueChar;
exports.decimalPlacesLimit = decimalPlacesLimit;
//# sourceMappingURL=string.js.map
