ToUpper() public method

public ToUpper ( String str ) : String
str String
return String
コード例 #1
0
    public void MessageInfo(string LabelInfo, int TypeInfo)
    {
        LeanTween.scale(gameObject, Vector3.one, 0f);

        System.Globalization.CultureInfo cultureInfo = System.Threading.Thread.CurrentThread.CurrentCulture;
        System.Globalization.TextInfo    textInfo    = cultureInfo.TextInfo;

        Label.text = textInfo.ToUpper(LabelInfo);
        switch (TypeInfo)
        {
        case 1: Btn3.gameObject.SetActive(false); Btn2.gameObject.SetActive(true); break;

        case 2: Btn2.gameObject.SetActive(false); Btn3.gameObject.SetActive(false); break;

        default: Btn2.gameObject.SetActive(true); Btn3.gameObject.SetActive(true); break;
        }
    }
コード例 #2
0
ファイル: NameGeneration.cs プロジェクト: cjheath/NORMA
				private string DoFirstLetterCase(NamePart name, bool upper, TextInfo textInfo)
				{
					string nameValue = name;
					if (string.IsNullOrEmpty(nameValue))
					{
						return nameValue;
					}
					char c = nameValue[0];
					if (upper)
					{
						c = textInfo.ToUpper(c);
					}
					else
					{
						c = textInfo.ToLower(c);
					}
					if (nameValue.Length > 1)
					{
						nameValue = c.ToString() + nameValue.Substring(1);
					}
					else
					{
						nameValue = c.ToString();
					}
					return nameValue;
				}
コード例 #3
0
ファイル: MainWindow.xaml.cs プロジェクト: WilStead/IdeaTree
 private static Func<string, string> GetCaseChange(TextInfo info, string text)
 {
     if (info.ToLower(text) == text) return (txt) => info.ToTitleCase(txt);
     else if (info.ToUpper(text) == text) return (txt) => info.ToLower(txt);
     else return (txt) => info.ToUpper(txt);
 }
コード例 #4
0
ファイル: NameGeneration.cs プロジェクト: cjheath/NORMA
				private string DoFirstWordCasing(NamePart name, NameGeneratorCasingOption casing, TextInfo textInfo)
				{
					if (name.ExplicitCasing) return name;
					switch (casing)
					{
						case NameGeneratorCasingOption.Camel:
							return TestHasAdjacentUpperCase(name) ? (string)name : DoFirstLetterCase(name, false, textInfo);
						case NameGeneratorCasingOption.Pascal:
							return TestHasAdjacentUpperCase(name) ? (string)name : DoFirstLetterCase(name, true, textInfo);
						case NameGeneratorCasingOption.Lower:
							return TestHasAdjacentUpperCase(name) ? (string)name : textInfo.ToLower(name);
						case NameGeneratorCasingOption.Upper:
							return textInfo.ToUpper(name);
					}

					return null;
				}