mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-20 17:08:00 +02:00
Minor IDE changes
This commit is contained in:
parent
be3c968e2b
commit
2ea5d31c37
15 changed files with 373 additions and 87 deletions
|
@ -54,9 +54,9 @@ namespace System.IO
|
|||
|
||||
}
|
||||
|
||||
public static void GetFileName(String inPath, String outFileName)
|
||||
public static void GetFileName(StringView inPath, String outFileName)
|
||||
{
|
||||
if (inPath == null)
|
||||
if (inPath.IsEmpty)
|
||||
return;
|
||||
|
||||
CheckInvalidPathChars(inPath);
|
||||
|
@ -236,7 +236,7 @@ namespace System.IO
|
|||
outFileName.Append(inPath, lastSlash + 1);
|
||||
}
|
||||
|
||||
public static Result<void> GetExtension(String inPath, String outExt)
|
||||
public static Result<void> GetExtension(StringView inPath, String outExt)
|
||||
{
|
||||
int i;
|
||||
if ((i = inPath.LastIndexOf('.')) != -1)
|
||||
|
|
|
@ -561,6 +561,17 @@ namespace System.IO
|
|||
return .Ok;
|
||||
}
|
||||
|
||||
public Result<char8> Read()
|
||||
{
|
||||
if (mStream == null)
|
||||
return .Err;
|
||||
if (mCharPos == mCharLen)
|
||||
{
|
||||
if (Try!(ReadBuffer()) == 0) return .Err;
|
||||
}
|
||||
return mCharBuffer[mCharPos++];
|
||||
}
|
||||
|
||||
public struct LineReader : IEnumerator<Result<StringView>>
|
||||
{
|
||||
StreamReader mStreamReader;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue