mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-19 00:20:25 +02:00
Improved string-to-sized-array casts and initializations
This commit is contained in:
parent
1320b495d2
commit
c6f2798db7
4 changed files with 55 additions and 1 deletions
|
@ -5,6 +5,8 @@ namespace Tests
|
|||
{
|
||||
class Strings
|
||||
{
|
||||
const String cString = "Abc";
|
||||
|
||||
static void FormatString(String outString, String format, params Object[] args)
|
||||
{
|
||||
outString.AppendF(format, params args);
|
||||
|
@ -32,6 +34,11 @@ namespace Tests
|
|||
StringView sv = "Abcd";
|
||||
sv.Length--;
|
||||
Test.Assert(sv == "Abc");
|
||||
|
||||
char8[?] arr0 = "Abcd";
|
||||
char8[?] arr1 = cString;
|
||||
Test.Assert(arr0.Count == 4);
|
||||
Test.Assert(arr1.Count == 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue