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