/[MorrowindCustomClothingSlotCreator]/trunk/libTES3FileFormat/ByteExtension.cs
ViewVC logotype

Contents of /trunk/libTES3FileFormat/ByteExtension.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5 - (show annotations) (download)
Fri Jul 29 10:09:00 2011 UTC (9 years, 2 months ago) by william
File size: 534 byte(s)
*** add support for parsing, commit, and getting bytes of the individual sections

1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5
6 namespace libTES3FileFormat
7 {
8 public static class ByteExtension
9 {
10 public static string ToStr(this byte[] bytes)
11 {
12 StringBuilder builder = new StringBuilder();
13 for (int i = 0; i < bytes.Length - 1; i++) { builder.Append(bytes[i].ToString("X2") + " "); }
14 builder.Append(bytes[bytes.Length - 1].ToString("X2"));
15 return builder.ToString();
16 }
17 }
18 }

  ViewVC Help
Powered by ViewVC 1.1.22