2014-11-01 02:26:07 +01:00
|
|
|
using System;
|
|
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
2014-11-03 00:05:54 +01:00
|
|
|
namespace System.Unicode
|
2014-11-01 02:26:07 +01:00
|
|
|
{
|
|
|
|
|
public struct CodePointEnumerable : IEnumerable<int>
|
|
|
|
|
{
|
|
|
|
|
private readonly string text;
|
|
|
|
|
|
|
|
|
|
public CodePointEnumerable(string text)
|
|
|
|
|
{
|
|
|
|
|
this.text = text;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Text { get { return text; } }
|
|
|
|
|
|
|
|
|
|
public CodePointEnumerator GetEnumerator()
|
|
|
|
|
{
|
|
|
|
|
return new CodePointEnumerator(text);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
IEnumerator<int> IEnumerable<int>.GetEnumerator()
|
|
|
|
|
{
|
|
|
|
|
return GetEnumerator();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
IEnumerator IEnumerable.GetEnumerator()
|
|
|
|
|
{
|
|
|
|
|
return GetEnumerator();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|