Polyfill for string things I expect in the .net libraries
using DWulf.LanguageExtensions;
will get you access to these.
◆ Basename()
static string Basename |
( |
this string |
s |
) |
|
|
inlinestatic |
like the bash tool, get the basename only.
assumes there is a file on the end. Uses forward slash on all platforms.
- Parameters
-
- Returns
◆ Dirname()
static string Dirname |
( |
this string |
s |
) |
|
|
inlinestatic |
like the bash tool, get the pathname only, no trailing slash.
assumes there is a file on the end. Does not add trailing slash. Uses forward slash on all platforms.
- Parameters
-
- Returns
◆ Extension()
static string Extension |
( |
this string |
s |
) |
|
|
inlinestatic |
like the bash tool, get the extension only.
assumes there is a file on the end. Returns the period too. Uses forward slash on all platforms.
- Parameters
-
- Returns
◆ Filename()
static string Filename |
( |
this string |
s |
) |
|
|
inlinestatic |
like the bash tool, get the basename and extension.
assumes there is a file on the end. Uses forward slash on all platforms.
- Parameters
-
- Returns
◆ NoTrailingSlash()
static string NoTrailingSlash |
( |
this string |
s |
) |
|
|
inlinestatic |
Remove a trailing slash, if there is one.
Uses forward slash on all platforms.
- Parameters
-
- Returns