StringFunc::Path Namespace. More...
Typedefs | |
using | FixedString = AZ::IO::FixedMaxPathString |
Functions | |
bool | Normalize (AZStd::string &inout) |
Normalize. | |
bool | Normalize (FixedString &inout) |
bool | IsValid (const char *in, bool bHasDrive=false, bool bHasExtension=false, AZStd::string *errors=NULL) |
IsValid. | |
bool | ConstructFull (const char *pRootPath, const char *pFileName, AZStd::string &out, bool bNormalize=false) |
ConstructFull. | |
bool | ConstructFull (const char *pRootPath, const char *pFileName, const char *pFileExtension, AZStd::string &out, bool bNormalize=false) |
bool | ConstructFull (const char *pRoot, const char *pRelativePath, const char *pFileName, const char *pFileExtension, AZStd::string &out, bool bNormalize=false) |
bool | Split (const char *in, AZStd::string *pDstDriveOut=nullptr, AZStd::string *pDstFolderPathOut=nullptr, AZStd::string *pDstNameOut=nullptr, AZStd::string *pDstExtensionOut=nullptr) |
Split. | |
bool | Join (const char *pFirstPart, const char *pSecondPart, AZStd::string &out, bool bCaseInsensitive=true, bool bNormalize=true) |
Join. | |
bool | Join (const char *pFirstPart, const char *pSecondPart, FixedString &out, bool bCaseInsensitive=true, bool bNormalize=true) |
bool | HasDrive (const char *in, bool bCheckAllFileSystemFormats=false) |
HasDrive. | |
bool | HasExtension (const char *in) |
HasExtension. | |
bool | IsExtension (const char *in, const char *pExtension, bool bCaseInsenitive=true) |
IsExtension. | |
bool | IsRelative (const char *in) |
IsRelative. | |
bool | StripDrive (AZStd::string &inout) |
StripDrive. | |
void | StripPath (AZStd::string &out) |
StripPath. | |
void | StripFullName (AZStd::string &out) |
StripFullName. | |
void | StripExtension (AZStd::string &inout) |
StripExtension. | |
bool | StripComponent (AZStd::string &inout, bool bLastComponent=false) |
StripComponent. | |
bool | GetDrive (const char *in, AZStd::string &out) |
GetDrive. | |
AZStd::optional< AZStd::string_view > | GetParentDir (AZStd::string_view path) |
GetParentDir. | |
bool | GetFullPath (const char *in, AZStd::string &out) |
GetFullPath. | |
bool | GetFolderPath (const char *in, AZStd::string &out) |
GetFolderPath. | |
bool | GetFolder (const char *in, AZStd::string &out, bool bFirst=false) |
GetFolder. | |
bool | GetFullFileName (const char *in, AZStd::string &out) |
GetFullFileName. | |
bool | GetFileName (const char *in, AZStd::string &out) |
GetFileName. | |
bool | GetExtension (const char *in, AZStd::string &out, bool includeDot=true) |
GetExtension. | |
void | ReplaceFullName (AZStd::string &inout, const char *pFileName, const char *pFileExtension=nullptr) |
ReplaceFullName. | |
void | ReplaceExtension (AZStd::string &inout, const char *pFileExtension) |
ReplaceExtension. | |
AZStd::string & | AppendSeparator (AZStd::string &inout) |
AppendSeparator. | |
AZ::IO::FixedMaxPath | MakeUniqueFilenameWithSuffix (const AZ::IO::PathView &basePath, const AZStd::string_view &suffix="") |
MakeUniqueFilenameWithSuffix. | |
StringFunc::Path Namespace.
For string functions that deal with general pathing. ! A path is made up of one or more "component" parts: ! a root (which can be made of one or more components) ! the relative (which can be made of one or more components) ! the full name (which can be only 1 component, and is the only required component) ! The general form of a path is: ! | full path | ! | path | fullname | ! | root | relativepath | filename | extension | ! | drive | folder path | ! | drive | ! | component | component | component | component | ! On PC and similar platforms, ! [drive [A-Z] AZ_FILESYSTEM_DRIVE_SEPARATOR or]AZ_CORRECT_FILESYSTEM_SEPARATOR rootPath AZ_CORRECT_FILESYSTEM_SEPARATOR relativePath AZ_CORRECT_FILESYSTEM_SEPARATOR filename<AZ_FILESYSTEM_EXTENSION_SEPARATOR ext> ! NETWORK_START[machine] AZ_CORRECT_FILESYSTEM_SEPARATOR network share ! Example: "C:\\p4\\some.file" ! Example: "\\\\18byrne\\share\\p4\\some.file" ! ! For ease of understanding all examples assume Windows PC: ! AZ_CORRECT_FILESYSTEM_SEPARATOR is '\' character ! AZ_WRONG_FILESYSTEM_SEPARATOR is '/' character ! AZ_FILESYSTEM_EXTENSION_SEPARATOR is '.' character ! AZ_FILESYSTEM_DRIVE_SEPARATOR is ':' character ! AZ_NETWORK_START "\\\\" string ! ! "root" is defined as the beginning of a valid path (it is a point from which a relative path/resource can be appended) ! a root must have a "drive" ! a root may or may not have a AZ_FILESYSTEM_DRIVE_SEPARATOR ! a root may or may not have a AZ_NETWORK_START ! a root always ends with a AZ_CORRECT_FILESYSTEM_SEPARATOR ! => C:\\p4\\Main\\Source\\GameAssets\\ ! => D:\\ ! => \\\\18username\\p4\\Main\\Source\\GameAssets\\ ! ! "filename" is defined as all the characters after the last AZ_CORRECT_FILESYSTEM_SEPARATOR up to ! but not including AZ_FILESYSTEM_EXTENSION_SEPARATOR if any. ! EX: D:\\p4\\Main\\Source\\GameAssets\\gameinfo\\Characters\\some.xml ! => some ! ! "extension" is defined as the last AZ_FILESYSTEM_EXTENSION_SEPARATOR + all characters afterward ! Note extension is considered part of the fullname component and its size takes away ! from the MAX_FILE_NAME_LEN, so filename + AZ_FILESYSTEM_EXTENSION_SEPARATOR + extension (if any), has to be <= MAX_FILE_NAME_LEN ! Note all functions that deal with extensions should be tolerant of missing AZ_FILESYSTEM_EXTENSION_SEPARATOR ! EX. ReplaceExtension("xml") and (".xml") both should arrive at the same result ! Note also when stripping name the extension is also stripped ! EX: D:\\p4\\Main\\Source\\GameAssets\\gameinfo\\Characters\\some.xml ! => .xml ! ! "fullname" is defined as name + ext (if any) ! EX: D:\\p4\\Main\\Source\\GameAssets\\gameinfo\\Characters\\some.xml ! => some.xml ! ! "relativePath" is defined as anything in between a root and the filename ! Note: relative paths DO NOT start with a AZ_CORRECT_FILESYSTEM_SEPARATOR but ALWAYS end with one ! EX: D:\\p4\\Main\\Source\\GameAssets\\gameinfo\\Characters\\some.xml ! => gameinfo\\Characters\\ ! ! "path" is defined as all characters up to and including the last AZ_CORRECT_FILESYSTEM_SEPARATOR ! EX: D:\\p4\\Main\\Source\\GameAssets\\gameinfo\\Characters\\some.xml ! => D:\\p4\\Main\\Source\\GameAssets\\gameinfo\\Characters\\ ! ! "folder path" is defined as all characters in between and including the first and last AZ_CORRECT_FILESYSTEM_SEPARATOR ! EX: D:\\p4\\Main\\Source\\GameAssets\\gameinfo\\Characters\\some.xml ! => \\p4\\Main\\Source\\GameAssets\\gameinfo\\Characters\\ ! EX: /app_home/gameinfo/Characters/some.xml ! => /gameinfo/Characters/ ! ! "drive" on PC and similar platforms ! is defined as all characters up to and including the first AZ_FILESYSTEM_DRIVE_SEPARATOR or ! all characters up to but not including the first AZ_CORRECT_FILESYSTEM_SEPARATOR after a NETWORK_START ! D:\\p4\\Main\\Source\\GameAssets\\gameinfo\\Characters\\some.xml ! => D: ! EX: \\\\18username\\p4\\Main\\Source\\GameAssets\\gameinfo\\Characters\\some.xml ! => \\\\18username ! ! "fullpath" is defined as having a root, relative path and filename ! EX: D:\\p4\\Main\\Source\\GameAssets\\gameinfo\\Characters\\some.xml ! ! "component" refers to any piece of a path. All components have a AZ_CORRECT_FILESYSTEM_SEPARATOR except file name. ! EX: D:\\p4\\Main\\Source\\GameAssets\\gameinfo\\Characters\\some.xml ! => "D:\", "p4\", "Main\", "Source\", "GameAssets\", "gameinfo\", "Characters\", "some.xml" ! EX: /app_home/gameinfo/Characters/some.xml ! => "/app_home/", "gameinfo/", "Characters/", "some.xml"
AZStd::string & AZ::StringFunc::Path::AppendSeparator | ( | AZStd::string & | inout | ) |
AppendSeparator.
Appends the correct separator to the path ! EX: StringFunc::Path::AppendSeparator("C:\\project\\intermediateassets", &path); ! path=="C:\\project\\intermediateassets\\"
bool AZ::StringFunc::Path::ConstructFull | ( | const char * | pRootPath, |
const char * | pFileName, | ||
AZStd::string & | out, | ||
bool | bNormalize = false |
||
) |
ConstructFull.
Constructs a full path from pieces and does some minimal smart normalization to make it easier, returns if it was successful ! EX: StringFunc::Path::ContructFull("C:\\p4", "some.file", a) == true; a == "C:\\p4\\some.file" ! EX: StringFunc::Path::ContructFull("C:\\p4", "game/info\\some.file", a, true) == true; a == "C:\\p4\\game\\info\\some.file" ! EX: StringFunc::Path::ContructFull("C:\\p4", "/some", "file", a, true) == true; a== "C:\\p4\\some.file" ! EX: StringFunc::Path::ContructFull("C:\\p4", "some", ".file", a) == true; a== "C:\\p4\\some.file" ! EX: StringFunc::Path::ContructFull("C:\\p4", "info", "some", "file", a) == true; a=="C:\\p4\\info\\some.file"
bool AZ::StringFunc::Path::GetDrive | ( | const char * | in, |
AZStd::string & | out | ||
) |
GetDrive.
if a c-string has a drive put it in AZStd::string, returns if it was sucessful ! EX: StringFunc::Path::GetDrive("C:\\p4\\game\\info\\some.file",a) == true; a=="C:" ! EX: StringFunc::Path::GetDrive("\\\\18username\\p4\\game\\info\\some.file",a) == true; a=="\\\18username"
bool AZ::StringFunc::Path::GetExtension | ( | const char * | in, |
AZStd::string & | out, | ||
bool | includeDot = true |
||
) |
GetExtension.
if a c-string has an extension put it in AZStd::string, returns if it was sucessful ! EX: StringFunc::Path::GetFileName("D:\\p4\\Main\\Source\\GameAssets\\gameinfo\\Characters\\some.xml", a) == true; a==".xml" ! EX: StringFunc::Path::GetFileName("D:\\p4\\Main\\Source\\GameAssets\\gameinfo\\Characters\\", a) == false; ! EX: StringFunc::Path::GetExtension("D:\p4\Main\Source\GameAssets\gameinfo\Characters\some.xml", a, false) == true; a=="xml"
bool AZ::StringFunc::Path::GetFileName | ( | const char * | in, |
AZStd::string & | out | ||
) |
GetFileName.
if a c-string has a file name put it in AZStd::string, returns if it was sucessful ! EX: StringFunc::Path::GetFileName("D:\\p4\\Main\\Source\\GameAssets\\gameinfo\\Characters\\some.xml", a) == true; a=="some" ! EX: StringFunc::Path::GetFileName("D:\\p4\\Main\\Source\\GameAssets\\gameinfo\\Characters\\", a) == false;
bool AZ::StringFunc::Path::GetFolder | ( | const char * | in, |
AZStd::string & | out, | ||
bool | bFirst = false |
||
) |
GetFolder.
if a c-string has a beginning or ending folder put it in AZStd::string, returns if it was sucessful ! EX: StringFunc::Path::GetFolder("D:\\p4\\Main\\Source\\GameAssets\\gameinfo\\Characters\\some.xml", a) == true; a=="p4" ! EX: StringFunc::Path::GetFolder("D:\\p4\\Main\\Source\\GameAssets\\gameinfo\\Characters\\some.xml", a, true) == true; a=="Characters"
bool AZ::StringFunc::Path::GetFolderPath | ( | const char * | in, |
AZStd::string & | out | ||
) |
GetFolderPath.
if a c-string has a folderpath put it in AZStd::string, returns if it was sucessful ! EX: StringFunc::Path::GetFolderPath("D:\\p4\\Main\\Source\\GameAssets\\gameinfo\\Characters\\some.xml",a) == true; a=="\\p4\\Main\\Source\\GameAssets\\gameinfo\\Characters"
bool AZ::StringFunc::Path::GetFullFileName | ( | const char * | in, |
AZStd::string & | out | ||
) |
GetFullFileName.
if a c-string has afull file name put it in AZStd::string, returns if it was sucessful ! EX: StringFunc::Path::GetFullFileName("D:\\p4\\Main\\Source\\GameAssets\\gameinfo\\Characters\\some.xml", a) == true; a=="some.xml" ! EX: StringFunc::Path::GetFullFileName("D:\\p4\\Main\\Source\\GameAssets\\gameinfo\\Characters\\", a) == false;
bool AZ::StringFunc::Path::GetFullPath | ( | const char * | in, |
AZStd::string & | out | ||
) |
GetFullPath.
if a c-string has a fullpath put it in AZStd::string, returns if it was sucessful ! EX: StringFunc::Path::GetFullPath("D:\\p4\\Main\\Source\\GameAssets\\gameinfo\\Characters\\some.xml",a) == true; a=="D:\\p4\\Main\\Source\\GameAssets\\gameinfo\\Characters"
AZStd::optional< AZStd::string_view > AZ::StringFunc::Path::GetParentDir | ( | AZStd::string_view | path | ) |
GetParentDir.
Retrieves the parent directory using the supplied @in string ! If @in ends with a trailing slash, it is treated the same as a directory without the trailing slash ! EX: StringFunc::Path::GetParentDir("D:\\p4\\Main\\Source\\GameAssets\\gameinfo\\Characters\\some.xml",a) == true; a=="D:\\p4\\Main\\Source\\GameAssets\\gameinfo\\Characters" ! EX: StringFunc::Path::GetParentDir("D:\\p4\\Main\\Source\\GameAssets\\gameinfo\\Characters\\",a) == true; a=="D:\p4\Main\Source\GameAssets\gameinfo" ! EX: StringFunc::Path::GetParentDir("D:\p4\Main\Source\GameAssets\gameinfo\Characters",a) == true; a=="D:\p4\Main\Source\GameAssets\gameinfo" ! EX: StringFunc::Path::GetParentDir("D:\",a) == true; a=="D:\"
bool AZ::StringFunc::Path::HasDrive | ( | const char * | in, |
bool | bCheckAllFileSystemFormats = false |
||
) |
HasDrive.
returns if the c-string has a "drive" ! EX: StringFunc::Path::HasDrive("C:\\p4\\game\\info\\some.file") == true ! EX: StringFunc::Path::HasDrive("\\p4\\game\\info\\some.file") == false ! EX: StringFunc::Path::HasDrive("\\\\18usernam\\p4\\game\\info\\some.file") == true
bool AZ::StringFunc::Path::HasExtension | ( | const char * | in | ) |
HasExtension.
returns if the c-string has an "extension" ! make sure its not empty ! make sure AZ_FILESYSTEM_EXTENSION_SEPARATOR is not the first or last character ! make sure AZ_FILESYSTEM_EXTENSION_SEPARATOR occurs after the last AZ_CORRECT_FILESYSTEM_SEPARATOR (if it has one) ! make sure its at most MAX_EXTENSION_LEN chars including the AZ_FILESYSTEM_EXTENSION_SEPARATOR character ! EX: StringFunc::Path::HasExtension("C:\\p4\\game\\info\\some.file") == true ! EX: StringFunc::Path::HasExtension("\\p4\\game\\info\\some") == false
bool AZ::StringFunc::Path::IsExtension | ( | const char * | in, |
const char * | pExtension, | ||
bool | bCaseInsenitive = true |
||
) |
IsExtension.
returns if the c-string has an "extension", optionally case case sensitive ! make sure its HasExtension() ! tolerate not having an AZ_FILESYSTEM_EXTENSION_SEPARATOR on the comparison ! EX: StringFunc::Path::IsExtension("C:\\p4\\game\\info\\some.file", "file") == true ! EX: StringFunc::Path::IsExtension("C:\\p4\\game\\info\\some.file", ".file") == true ! EX: StringFunc::Path::IsExtension("\\p4\\game\\info\\some") == false ! EX: StringFunc::Path::IsExtension("\\p4\\game\\info\\some.file", ".FILE", true) == false
bool AZ::StringFunc::Path::IsRelative | ( | const char * | in | ) |
IsRelative.
returns if the c-string fulfills the requirements to be "relative" ! make sure its not empty ! make sure its does not have a "drive" ! make sure its doesn't start with AZ_CORRECT_FILESYSTEM_SEPARATOR ! EX: StringFunc::Path::IsRelative("p4\\game\\info\\some.file") == true ! EX: StringFunc::Path::IsRelative("\\p4\\game\\info\\some.file") == false ! EX: StringFunc::Path::IsRelative("C:\\p4\\game\\info\\some.file") == false
bool AZ::StringFunc::Path::IsValid | ( | const char * | in, |
bool | bHasDrive = false , |
||
bool | bHasExtension = false , |
||
AZStd::string * | errors = NULL |
||
) |
IsValid.
Returns if this string has the requirements to be a path ! make sure its not empty ! make sure it has no AZ_FILESYSTEM_INVALID_CHARACTERS ! make sure it has no WRONG_SEPARATORS ! make sure it HasDrive() if bHasDrive is set ! if AZ_FILENAME_ALLOW_SPACES is not set then it makes sure it doesn't have any spaces ! make sure total length <= AZ_MAX_PATH_LEN Example: Is the AZStd::string a valid root StringFunc::Path::IsValid(a="p4\\game\\") == true StringFunc::Path::IsValid(a="p4/game/") == false; Wrong separators StringFunc::Path::IsValid(a="C:\p4\game\") == true StringFunc::Path::IsValid(a="C:\p4\game") == true StringFunc::Path::IsValid(a="C:\p4\game\some.file") == true
bool AZ::StringFunc::Path::Join | ( | const char * | pFirstPart, |
const char * | pSecondPart, | ||
AZStd::string & | out, | ||
bool | bCaseInsensitive = true , |
||
bool | bNormalize = true |
||
) |
Join.
Joins two pieces of a path returns if it was successful ! This has similar behavior to Python pathlib '/' operator and os.path.join ! Specifically, that it uses the last absolute path as the anchor for the resulting path ! https://docs.python.org/3/library/pathlib.html#pathlib.PurePath ! This means that joining StringFunc::Path::Join("C:\\O3DE" "F:\\O3DE") results in "F:\\O3DE" ! not "C:\\O3DE\\F:\\O3DE" ! EX: StringFunc::Path::Join("C:\\p4\\game","info\\some.file", a) == true; a== "C:\\p4\\game\\info\\some.file" ! EX: StringFunc::Path::Join("C:\\p4\\game\\info", "game\\info\\some.file", a) == true; a== "C:\\p4\\game\\info\\game\\info\\some.file" ! EX: StringFunc::Path::Join("C:\\p4\\game\\info", "\\game\\info\\some.file", a) == true; a== "C:\\game\\info\\some.file" ! (Replaces root directory part)
AZ::IO::FixedMaxPath AZ::StringFunc::Path::MakeUniqueFilenameWithSuffix | ( | const AZ::IO::PathView & | basePath, |
const AZStd::string_view & | suffix = "" |
||
) |
MakeUniqueFilenameWithSuffix.
given a directory path and an optional extension will return a unique filename ! EX: StringFunc::Path::MakeUniqueFilenameWithSuffix("c:\\folder\\NewFile.txt", "-copy") ! if "NewFile.txt" doesn't exist, returns "c:\\folder\\Newfile.txt" ! if "NewFile.txt" exists, returns "c:\\folder\\Newfile-copy1.txt" ! if both "NewFile.txt" and "NewFile-copy1.txt" exist, returns "c:\\folder\\Newfile-copy2.txt" etc.
bool AZ::StringFunc::Path::Normalize | ( | AZStd::string & | inout | ) |
Normalize.
Normalizes a path and returns returns StringFunc::Path::IsValid() ! strips all AZ_FILESYSTEM_INVALID_CHARACTERS ! all AZ_WRONG_FILESYSTEM_SEPARATOR's are replaced with AZ_CORRECT_FILESYSTEM_SEPARATOR's ! all AZ_DOUBLE_CORRECT_SEPARATOR's (not in the "drive") are replaced with AZ_CORRECT_FILESYSTEM_SEPARATOR's ! makes sure it does not have a drive ! makes sure it does not start with a AZ_CORRECT_FILESYSTEM_SEPARATOR Example: Normalize a AZStd::string path StringFunc::Path::Normalize(a="\\p4/game/") == true; a=="p4\\game\\" StringFunc::Path::Normalize(a="p4/game/") == true; a=="p4\game\" StringFunc::Path::Normalize(a="C:\p4/game") == true; a=="C:\p4\game\"
void AZ::StringFunc::Path::ReplaceExtension | ( | AZStd::string & | inout, |
const char * | pFileExtension | ||
) |
ReplaceExtension.
if a AZStd::string HasExtension() then replace it with pDrive ! EX: StringFunc::Path::ReplaceExtension(a="D:\\p4\\some.file", "xml"); a=="D:\\p4\\some.xml" ! EX: StringFunc::Path::ReplaceExtension(a="D:\\p4\\some.file", ".xml"); a=="D:\\p4\\some.xml" ! EX: StringFunc::Path::ReplaceExtension(a="D:\\p4\\some.file", ""); a=="D:\\p4\\some"
void AZ::StringFunc::Path::ReplaceFullName | ( | AZStd::string & | inout, |
const char * | pFileName, | ||
const char * | pFileExtension = nullptr |
||
) |
ReplaceFullName.
if a AZStd::string has a full name then replace it with pFileName and optionally with pExtension ! EX: StringFunc::Path::ReplaceFullName(a="D:\\p4\\some.file", "other", ".xml"); a=="D:\\p4\\other.xml" ! EX: StringFunc::Path::ReplaceFullName(a="D:\\p4\\some.file", "other.xml"); a=="D:\\p4\\other.xml" ! EX: StringFunc::Path::ReplaceFullName(a="D:\\p4\\some.file", "other.file", "xml"); a=="D:\\p4\\other.xml" ! EX: StringFunc::Path::ReplaceFullName(a="D:\\p4\\some.file", "other.file", ""); a=="D:\\p4\\other"
bool AZ::StringFunc::Path::Split | ( | const char * | in, |
AZStd::string * | pDstDriveOut = nullptr , |
||
AZStd::string * | pDstFolderPathOut = nullptr , |
||
AZStd::string * | pDstNameOut = nullptr , |
||
AZStd::string * | pDstExtensionOut = nullptr |
||
) |
Split.
Splits a full path into pieces, returns if it was successful ! EX: StringFunc::Path::Split("C:\\p4\\game\\info\\some.file", &drive, &folderPath, &fileName, &extension) = true; drive==C: , folderPath=="\\p4\\game\\info\\", filename=="some", extension==".file"
bool AZ::StringFunc::Path::StripComponent | ( | AZStd::string & | inout, |
bool | bLastComponent = false |
||
) |
StripComponent.
gets rid of the first or last if it has one, returns if it removed one or not ! EX: StringFunc::Path::StripComponent(a="D:\\p4\\Main\\Source\\GameAssets\\gameinfo\\Characters\\some.xml") == true; a=="p4\\Main\\Source\\GameAssets\\gameinfo\\Characters\\some.xml" ! EX: StringFunc::Path::StripComponent(a="p4\\Main\\Source\\GameAssets\\gameinfo\\Characters\\some.xml") == true; a=="Main\\Source\\GameAssets\\gameinfo\\Characters\\some.xml" ! EX: StringFunc::Path::StripComponent(a="Main\\Source\\GameAssets\\gameinfo\\Characters\\some.xml") == true; a=="Source\\GameAssets\\gameinfo\\Characters\\some.xml" ! EX: StringFunc::Path::StripComponent(a="Main\\Source\\GameAssets\\gameinfo\\Characters\\some.xml", true) == true; a=="Main\\Source\\GameAssets\\gameinfo\\Characters" ! EX: StringFunc::Path::StripComponent(a="Main\\Source\\GameAssets\\gameinfo\\Characters", true) == true; a=="Main\\Source\\GameAssets\\gameinfo"
bool AZ::StringFunc::Path::StripDrive | ( | AZStd::string & | inout | ) |
StripDrive.
gets rid of the drive component if it has one, returns if it removed one or not ! EX: StringFunc::Path::StripDrive(a="C:\\p4\\game\\info\\some.file") == true; a=="\\p4\\game\\info\\some.file"
void AZ::StringFunc::Path::StripExtension | ( | AZStd::string & | inout | ) |
StripExtension.
gets rid of the extension if it has one, returns if it removed one or not ! EX: StringFunc::Path::StripExtension(a="C:\\p4\\game\\info\\some.file") == true; a=="C:\\p4\\game\\info\\some"
void AZ::StringFunc::Path::StripFullName | ( | AZStd::string & | out | ) |
StripFullName.
gets rid of the full file name if it has one, returns if it removed one or not ! EX: StringFunc::Path::StripFullName(a="C:\\p4\\game\\info\\some.file") == true; a=="C:\\p4\\game\\info"
void AZ::StringFunc::Path::StripPath | ( | AZStd::string & | out | ) |
StripPath.
gets rid of the path if it has one, returns if it removed one or not ! EX: StringFunc::Path::StripPath(a="C:\\p4\\game\\info\\some.file") == true; a=="some.file"