23 lines
636 B
Text
23 lines
636 B
Text
using System;
|
|
using System.Globalization;
|
|
using System.Windows.Forms;
|
|
using System.Console;
|
|
using Nemerle.Utility.NString;
|
|
|
|
module StrReverse
|
|
{
|
|
UReverse(text : string) : string
|
|
{
|
|
mutable output = [];
|
|
def elements = StringInfo.GetTextElementEnumerator(text);
|
|
while (elements.MoveNext())
|
|
output ::= elements.GetTextElement().ToString();
|
|
Concat("", output.Reverse());
|
|
}
|
|
|
|
Main() : void
|
|
{
|
|
def test = "as⃝df̅";
|
|
MessageBox.Show($"$test --> $(UReverse(test))"); //for whatever reason my console didn't display Unicode properly, but a MessageBox worked
|
|
}
|
|
}
|