Upper Case#
Operations / Transform / Upper Case
Can Read
Cannot Write
Description#
Converts every character of a text to its upper case form
Parameters#
| Name | Description |
|---|---|
| Text | The text that is converted |
Code#
using System;
using UnityEngine;
using VisualScript.Icons;
namespace VisualScript.Runtime
{
[Get]
[Title("Upper Case")]
[Category("Operations/Transform/Upper Case")]
[Description("Converts every character of a text to its upper case form")]
[Image(typeof(IconString), ColorTheme.Type.Yellow, typeof(BadgeArrowUp))]
[Parameter("Text", "The text that is converted")]
[Keywords("Capital", "Caps", "Uppercase", "Text")]
[Serializable]
public class TypeStringUpperCase : TypeString
{
[SerializeField] private GetString m_Text = new GetString();
public override string GetPreview(GameObject source) => this.m_Text.GetPreview(source)?.ToUpperInvariant() ?? string.Empty;
public override string Get(Args args)
{
return this.m_Text.Get(args)?.ToUpperInvariant() ?? string.Empty;
}
public override string ToString()
{
return $"Upper {this.m_Text}";
}
protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
}
}