mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
25 lines
386 B
C#
25 lines
386 B
C#
|
|
using System;
|
||
|
|
using System.Text;
|
||
|
|
|
||
|
|
namespace FileSystemIDandChk
|
||
|
|
{
|
||
|
|
public static class StringHandlers
|
||
|
|
{
|
||
|
|
public static string CToString (byte[] CString)
|
||
|
|
{
|
||
|
|
StringBuilder sb = new StringBuilder();
|
||
|
|
|
||
|
|
for(int i = 0; i<CString.Length; i++)
|
||
|
|
{
|
||
|
|
if(CString[i]==0)
|
||
|
|
break;
|
||
|
|
|
||
|
|
sb.Append(Encoding.ASCII.GetString(CString, i, 1));
|
||
|
|
}
|
||
|
|
|
||
|
|
return sb.ToString();
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|