Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Create< TState >()

static string System.String.Create< TState > ( int length,
TState state,
SpanAction< char, TState > action )
inlinestatic

Definition at line 1170 of file String.cs.

1171 {
1172 if (action == null)
1173 {
1174 throw new ArgumentNullException("action");
1175 }
1176 if (length <= 0)
1177 {
1178 if (length == 0)
1179 {
1180 return Empty;
1181 }
1182 throw new ArgumentOutOfRangeException("length");
1183 }
1184 string text = FastAllocateString(length);
1185 action(new Span<char>(ref text.GetRawStringData(), length), state);
1186 return text;
1187 }
static readonly string Empty
Definition String.cs:29
static string FastAllocateString(int length)

References System.action, System.String.Empty, System.String.FastAllocateString(), System.length, System.state, and System.text.