package io.gmss.fiscad.service;

import org.springframework.stereotype.Service;

@Service
public class StringManager {

    public String deleteWhiteSpace(String in) {
        return in.replaceAll(" ", "").trim();
    }

    public int countChar(String someString, String separator) {
        int count = 0;
        for (int i = 0; i < someString.length(); i++) {
            if (someString.charAt(i) == separator.charAt(0)) {
                count++;
            }
        }
        count++;
        return count;
        //return someString.split(separator).length;
    }


}
