예제 #1
0
        /// <summary>
        /// Format the specified text using the specified mask and prompt
        /// character.
        /// </summary>
        /// <param name="mask">The mask to use.</param>
        /// <param name="text">The text to format.</param>
        /// <param name="promptChar">The prompt character to use for missing
        /// characters.  If a null character ('\x0') is specified, prompt
        /// characters are omitted.</param>
        /// <returns>The formatted text string.</returns>
        public static string Format(string mask, string text, char promptChar)
        {
            MaskedTextResultHint hint;
            int pos;

            return(MaskedLabel.Format(mask, text, promptChar, null,
                                      out hint, out pos));
        }
예제 #2
0
        //=====================================================================
        // Static methods

        /// <summary>
        /// Format the specified text using the specified mask
        /// </summary>
        /// <param name="mask">The mask to use</param>
        /// <param name="text">The text to format</param>
        /// <returns>The formatted text string</returns>
        /// <overloads>There are four overloads for this method.</overloads>
        public static string Format(string mask, string text)
        {
            MaskedTextResultHint hint;
            int pos;

            return(MaskedLabel.Format(mask, text, '\x0', null,
                                      out hint, out pos));
        }