mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-19 12:30:32 +00:00
40 lines
913 B
C#
40 lines
913 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
|
|
namespace Indy.IL2CPU.IL.X86.CustomImplementations.System {
|
|
public static class StringImpl {
|
|
public static unsafe int get_Length(int* aThis) {
|
|
int* xThis = aThis;
|
|
xThis += 2;
|
|
xThis = (int*)*xThis;
|
|
xThis += 2;
|
|
return *xThis;
|
|
}
|
|
|
|
public static byte GetByteFromChar(char aChar) {
|
|
return 0;
|
|
}
|
|
|
|
public static unsafe byte get_Chars_Metal(uint* aThis, int aIndex) {
|
|
uint* xThis = aThis;
|
|
xThis += 3;
|
|
xThis = (uint*)*xThis;
|
|
xThis += 3;
|
|
byte* aBytes = (byte*)xThis;
|
|
aBytes += aIndex;
|
|
return *aBytes;
|
|
}
|
|
|
|
public static unsafe ushort get_Chars_Normal(uint* aThis, int aIndex) {
|
|
uint* xThis = aThis;
|
|
xThis += 3;
|
|
xThis = (uint*)*xThis;
|
|
xThis += 3;
|
|
ushort* aBytes = (ushort*)xThis;
|
|
aBytes += aIndex;
|
|
return *aBytes;
|
|
}
|
|
}
|
|
}
|