コード例 #1
0
        /**
         * Constructs a transliterator.
         */

        public CaseFoldTransliterator()
            : base(_ID, null)
        {
            csp    = UCaseProps.Instance;
            iter   = new ReplaceableContextIterator();
            result = new StringBuilder();
        }
コード例 #2
0
        }                                                   // ICU4N TODO: API - see whether it makes sense to make a [Flags] enum for opt

        private static int GetCaseLocale(CultureInfo locale)
        {
            if (locale == null)
            {
                locale = CultureInfo.CurrentCulture;
            }
            return(UCaseProps.GetCaseLocale(locale));
        }
コード例 #3
0
 /// <summary>
 /// Constructs a transliterator.
 /// </summary>
 public UppercaseTransliterator(ULocale loc)
     : base(_ID, null)
 {
     locale     = loc;
     csp        = UCaseProps.Instance;
     iter       = new ReplaceableContextIterator();
     result     = new StringBuilder();
     caseLocale = UCaseProps.GetCaseLocale(locale);
 }
コード例 #4
0
 /// <summary>
 /// Constructs a transliterator.
 /// </summary>
 public TitlecaseTransliterator(ULocale loc)
     : base(_ID, null)
 {
     locale = loc;
     // Need to look back 2 characters in the case of "can't"
     MaximumContextLength = 2;
     csp        = UCaseProps.Instance;
     iter       = new ReplaceableContextIterator();
     result     = new StringBuilder();
     caseLocale = UCaseProps.GetCaseLocale(locale);
 }
コード例 #5
0
 /// <summary>
 /// Constructs a transliterator.
 /// </summary>
 ///
 public UppercaseTransliterator(ULocale loc) : base(_ID, null)
 {
     locale = loc;
     try {
         csp = IBM.ICU.Impl.UCaseProps.GetSingleton();
     } catch (IOException e) {
         csp = null;
     }
     iter        = new ReplaceableContextIterator();
     result      = new StringBuilder();
     locCache    = new int[1];
     locCache[0] = 0;
 }
コード例 #6
0
 /// <summary>
 /// Constructs a transliterator.
 /// </summary>
 ///
 public TitlecaseTransliterator(ULocale loc) : base(_ID, null)
 {
     locale = loc;
     // Need to look back 2 characters in the case of "can't"
     SetMaximumContextLength(2);
     try {
         csp = IBM.ICU.Impl.UCaseProps.GetSingleton();
     } catch (IOException e) {
         csp = null;
     }
     iter        = new ReplaceableContextIterator();
     result      = new StringBuilder();
     locCache    = new int[1];
     locCache[0] = 0;
 }