Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 833c76a

Browse files
Added GetAlphabet function to use a subset of letters from AlphabetFunctions.
1 parent 5d02c2d commit 833c76a

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

‎AIProgrammer.Managers/CommonManager.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,5 +267,21 @@ public static int GetFunctionCount(string program)
267267

268268
return count;
269269
}
270+
271+
/// <summary>
272+
/// Returns a string alphabet functions to be used within appendCode.
273+
/// </summary>
274+
/// <param name="to">Return alphabet functions from a through "to" inclusive.</param>
275+
/// <returns>string</returns>
276+
public static string GetAlphabet(char to = 'z')
277+
{
278+
string result = "";
279+
280+
string[] parts = AlphabetFunctions.Split("@".ToCharArray());
281+
int index = to - 'a';
282+
result = string.Join("@", parts.Take(index + 1)) + "@";
283+
284+
return result;
285+
}
270286
}
271287
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /