TianoCore EDK2 master
Loading...
Searching...
No Matches
FileName.c File Reference
#include "Udf.h"

Go to the source code of this file.

Functions

CHAR16 * TrimString (IN CHAR16 *String)
 
VOID ReplaceLeft (IN CHAR16 *Destination, IN CONST CHAR16 *Source)
 
CHAR16 * ExcludeTrailingBackslashes (IN CHAR16 *String)
 
CHAR16 * MangleFileName (IN CHAR16 *FileName)
 

Detailed Description

Helper functions for mangling file names in UDF/ECMA-167 file systems.

Copyright (C) 2014-2017 Paulo Alcantara pcacj.nosp@m.r@zy.nosp@m.tor.c.nosp@m.om

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file FileName.c.

Function Documentation

◆ ExcludeTrailingBackslashes()

CHAR16 * ExcludeTrailingBackslashes ( IN CHAR16 *  String)

Remove one or more consecutive backslashes starting from the second character of a given Unicode string.

Parameters
[in]StringA pointer to a Unicode string.
Returns
A pointer to the modified string.

Definition at line 71 of file FileName.c.

◆ MangleFileName()

CHAR16 * MangleFileName ( IN CHAR16 *  FileName)

Mangle a filename by cutting off trailing whitespaces, "\\", "." and "..".

Parameters
[in]FileNameFilename.
Return values
Themangled Filename.

Definition at line 110 of file FileName.c.

◆ ReplaceLeft()

VOID ReplaceLeft ( IN CHAR16 *  Destination,
IN CONST CHAR16 *  Source 
)

Replace the content of a Unicode string with the content of another Unicode string.

Parameters
[in]DestinationA pointer to a Unicode string.
[in]SourceA pointer to a Unicode string.

Definition at line 48 of file FileName.c.

◆ TrimString()

CHAR16 * TrimString ( IN CHAR16 *  String)

Trim the leading and trailing spaces for a give Unicode string.

Parameters
[in]StringThe Unicode string to trim.
Returns
A pointer to the trimmed string.

Definition at line 20 of file FileName.c.