Skip to content

Commit

Permalink
Expose StringHelper.GetStringLength (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhett12321 authored Jun 23, 2024
1 parent 70caec5 commit 38098e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/StringHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public static string ReadFixedLengthString(this NativeArray<byte> cString)
return ReadFixedLengthString(cString.Pointer, cString.Length);
}

private static int GetStringLength(byte* cString, int? maxLength = null)
public static int GetStringLength(byte* cString, int? maxLength = null)
{
byte* walk = cString;
while (*walk != 0 && (maxLength == null || walk - cString < maxLength))
Expand Down

0 comments on commit 38098e0

Please sign in to comment.