-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #115 from WSOFT-Project/develop
Losetta v0.10.2
- Loading branch information
Showing
23 changed files
with
1,054 additions
and
941 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
using AliceScript.Binding; | ||
using AliceScript.Functions; | ||
using System.Text; | ||
|
||
namespace AliceScript.NameSpaces.Core | ||
{ | ||
internal partial class CoreFunctions | ||
{ | ||
public static string ToString(this byte[] data, string charCode) | ||
{ | ||
return Encoding.GetEncoding(charCode).GetString(data); | ||
} | ||
public static string ToString(this byte[] data, int codePage) | ||
{ | ||
return Encoding.GetEncoding(codePage).GetString(data); | ||
} | ||
public static string ToBase64(this byte[] data) | ||
{ | ||
return System.Convert.ToBase64String(data); | ||
} | ||
public static string ToBase64(this byte[] data, int offcset, int length) | ||
{ | ||
return System.Convert.ToBase64String(data, offcset, length); | ||
} | ||
public static string ToBase64(this byte[] data, int offcset, int length, bool insertLineBrakes) | ||
{ | ||
return System.Convert.ToBase64String(data, offcset, length, insertLineBrakes ? Base64FormattingOptions.InsertLineBreaks : Base64FormattingOptions.None); | ||
} | ||
public static string ToBase64(this byte[] data, bool insertLineBrakes) | ||
{ | ||
return System.Convert.ToBase64String(data, 0, data.Length, insertLineBrakes ? Base64FormattingOptions.InsertLineBreaks : Base64FormattingOptions.None); | ||
} | ||
[AliceFunction(Attribute = FunctionAttribute.LANGUAGE_STRUCTURE)] | ||
public static int Length(this byte[] data) | ||
{ | ||
return data.Length; | ||
} | ||
[AliceFunction(Attribute = FunctionAttribute.LANGUAGE_STRUCTURE)] | ||
public static int Size(this byte[] data) | ||
{ | ||
return data.Length; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.