source:
branches/2895_PushGP_GenealogyAnalysis/HeuristicLab.Problems.ProgramSynthesis/Push/Extensions/CharExtentions.cs
Last change on this file was 15771, checked in by bburlacu, 7 years ago | |
---|---|
File size: 499 bytes |
Line | |
---|---|
1 | namespace HeuristicLab.Problems.ProgramSynthesis { |
2 | public static class CharExtentions { |
3 | public static string Printify(this char c) { |
4 | switch (c) { |
5 | case '\0': return "\\0"; |
6 | case '\a': return "\\a"; |
7 | case '\b': return "\\b"; |
8 | case '\f': return "\\f"; |
9 | case '\n': return "\\n"; |
10 | case '\r': return "\\r"; |
11 | case '\t': return "\\t"; |
12 | case '\v': return "\\v"; |
13 | default: return c.ToString(); |
14 | } |
15 | } |
16 | } |
17 | } |
Note: See TracBrowser
for help on using the repository browser.