GOLD.Engine.Symbol.LiteralFormat C# (CSharp) 메소드

LiteralFormat() 개인적인 메소드

private LiteralFormat ( string source, bool forceDelimit ) : string
source string
forceDelimit bool
리턴 string
        private string LiteralFormat(string source, bool forceDelimit)
        {
            if (source == "'")
            {
                return "''";
            }

            for (int i = 0; i < source.Length && !forceDelimit; i++)
            {
                char ch = source[i];
                forceDelimit = !(Char.IsLetter(ch) || ch == '.' || ch == '_' || ch == '-');
            }

            return forceDelimit ? "'" + source + "'" : source;
        }