mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +01:00
Extract Strings to separate submodule.
This commit is contained in:
parent
bc901f3ff6
commit
35baba18bf
75 changed files with 751 additions and 1657 deletions
|
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using Penumbra.GameData.ByteString;
|
||||
using Penumbra.String;
|
||||
using Penumbra.String.Functions;
|
||||
|
||||
namespace Penumbra.GameData.Enums;
|
||||
|
||||
|
|
@ -93,10 +94,10 @@ public static class ResourceTypeExtensions
|
|||
};
|
||||
}
|
||||
|
||||
public static ResourceType FromString( Utf8String path )
|
||||
public static ResourceType FromString( ByteString path )
|
||||
{
|
||||
var extIdx = path.LastIndexOf( ( byte )'.' );
|
||||
var ext = extIdx == -1 ? path : extIdx == path.Length - 1 ? Utf8String.Empty : path.Substring( extIdx + 1 );
|
||||
var ext = extIdx == -1 ? path : extIdx == path.Length - 1 ? ByteString.Empty : path.Substring( extIdx + 1 );
|
||||
|
||||
return ext.Length switch
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue