mirror of
https://github.com/maxartz15/MA_TextureAtlasser.git
synced 2024-11-14 01:15:37 +01:00
28 lines
605 B
C#
28 lines
605 B
C#
|
//-
|
|||
|
|
|||
|
using UnityEditor;
|
|||
|
using UnityEngine;
|
|||
|
|
|||
|
namespace MA_Toolbox.Utils
|
|||
|
{
|
|||
|
public static class MA_StringUtils
|
|||
|
{
|
|||
|
private const string ALPHABET = "aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ";
|
|||
|
|
|||
|
public static string RandomAlphabetString(int length)
|
|||
|
{
|
|||
|
string s = "";
|
|||
|
for (int i = 0; i < length; i++)
|
|||
|
{
|
|||
|
s += RandomAlphabetChar();
|
|||
|
}
|
|||
|
|
|||
|
return s;
|
|||
|
}
|
|||
|
|
|||
|
public static char RandomAlphabetChar()
|
|||
|
{
|
|||
|
return ALPHABET[Random.Range(0, ALPHABET.Length)];
|
|||
|
}
|
|||
|
}
|
|||
|
}
|