# DXGfxLib.StringUtil Class Reference

This helper class is not really meant to be instanciated but it's static methods are going to be very usefull for the kind of string manipulation we need in EterEngine. For example extract the extension of a fileName, struncate the base directory out of a full pathname and build relative path. Not a very exciting job but this has to be done. More...

List of all members.

## Public Member Functions
| StringUtil ()
| StringUtil ()
## Static Public Member Functions
static string | GetExtension (string fileName)
| This method will return a string containing the extension of the fileName given in argument.
static string | GetName (string fileName)
| This static method return the name of an entity from a pathname to the file. Thus it returns only the file name with it's extension. Generally that the name which is used to reference afterward the entity through it's name.
static string | GetRelativePath (string basePath, string fileName)
| This static method removes the string passed as first argument from the string passed as second argument.
static string | GetRelativePathWithoutStartingSlash (string basePath, string fileName)
| This static method removes the string passed as first argument from the string passed as second argument.
static string | GetPath (string fileName)
| This static method removes the string passed as first argument from the string passed as second argument.
static string | GetPathWithoutTrailingSlash (string fileName)
| Same as GetPath except the return path does not contain any \ at the end.
static string | AppendDirectorySeparator (string path)
| This method will append a \ at the end of the provided string.
static string | GetNewIndexedName (string name, Hashtable hash)
| This will return a name that we guaranty is not in the given hashtable.
static string | GetExtension (string fileName)
| This method will return a string containing the extension of the fileName given in argument.
static string | GetName (string fileName)
| This static method return the name of an entity from a pathname to the file. Thus it returns only the file name with it's extension. Generally that the name which is used to reference afterward the entity through it's name.
static string | GetRelativePath (string basePath, string fileName)
| This static method removes the string passed as first argument from the string passed as second argument.
static string | GetRelativePathWithoutStartingSlash (string basePath, string fileName)
| This static method removes the string passed as first argument from the string passed as second argument.
static string | GetPath (string fileName)
| This static method removes the string passed as first argument from the string passed as second argument.
static string | GetPathWithoutTrailingSlash (string fileName)
| Same as GetPath except the return path does not contain any \ at the end.
static string | AppendDirectorySeparator (string path)
| This method will append a \ at the end of the provided string.
static string | GetNewIndexedName (string name, Hashtable hash)
| This will return a name that we guaranty is not in the given hashtable.

## Detailed Description

This helper class is not really meant to be instanciated but it's static methods are going to be very usefull for the kind of string manipulation we need in EterEngine. For example extract the extension of a fileName, struncate the base directory out of a full pathname and build relative path. Not a very exciting job but this has to be done.

Definition at line 30 of file StringUtil.cs.

## Constructor & Destructor Documentation

DXGfxLib.StringUtil.StringUtil | ( |  | ) |

Definition at line 35 of file StringUtil.cs.

DXGfxLib.StringUtil.StringUtil | ( |  | ) |

Definition at line 35 of file StringUtil.cs.

## Member Function Documentation

static string DXGfxLib.StringUtil.AppendDirectorySeparator | ( | string | path | ) | `[static]`

This method will append a \ at the end of the provided string.

Parameters:

  | path |

Returns:

Definition at line 194 of file StringUtil.cs.

static string DXGfxLib.StringUtil.AppendDirectorySeparator | ( | string | path | ) | `[static]`

This method will append a \ at the end of the provided string.

Parameters:

  | path |

Returns:

Definition at line 194 of file StringUtil.cs.

static string DXGfxLib.StringUtil.GetExtension | ( | string | fileName | ) | `[static]`

This method will return a string containing the extension of the fileName given in argument.

Parameters:

  | fileName | the relative or full pathname from which we want to extract the extension.

Returns:

Definition at line 45 of file StringUtil.cs.

static string DXGfxLib.StringUtil.GetExtension | ( | string | fileName | ) | `[static]`

This method will return a string containing the extension of the fileName given in argument.

Parameters:

  | fileName | the relative or full pathname from which we want to extract the extension.

Returns:

Definition at line 45 of file StringUtil.cs.

static string DXGfxLib.StringUtil.GetName | ( | string | fileName | ) | `[static]`

This static method return the name of an entity from a pathname to the file. Thus it returns only the file name with it's extension. Generally that the name which is used to reference afterward the entity through it's name.

Parameters:

  | fileName | the pathName to extract the file name or the name from.

Returns:

Definition at line 73 of file StringUtil.cs.

static string DXGfxLib.StringUtil.GetName | ( | string | fileName | ) | `[static]`

This static method return the name of an entity from a pathname to the file. Thus it returns only the file name with it's extension. Generally that the name which is used to reference afterward the entity through it's name.

Parameters:

  | fileName | the pathName to extract the file name or the name from.

Returns:

Definition at line 73 of file StringUtil.cs.

static string DXGfxLib.StringUtil.GetNewIndexedName | ( | string | name,
|  | Hashtable | hash |
| ) |  |  | `[static]`

This will return a name that we guaranty is not in the given hashtable.

Parameters:

  | name |
  | hash |

Returns:

Definition at line 205 of file StringUtil.cs.

static string DXGfxLib.StringUtil.GetNewIndexedName | ( | string | name,
|  | Hashtable | hash |
| ) |  |  | `[static]`

This will return a name that we guaranty is not in the given hashtable.

Parameters:

  | name |
  | hash |

Returns:

Definition at line 205 of file StringUtil.cs.

static string DXGfxLib.StringUtil.GetPath | ( | string | fileName | ) | `[static]`

This static method removes the string passed as first argument from the string passed as second argument.

Parameters:

  | basePath | the string to remove from the other string.
  | fileName | the string to work on.

Returns:

Definition at line 148 of file StringUtil.cs.

static string DXGfxLib.StringUtil.GetPath | ( | string | fileName | ) | `[static]`

This static method removes the string passed as first argument from the string passed as second argument.

Parameters:

  | basePath | the string to remove from the other string.
  | fileName | the string to work on.

Returns:

Definition at line 148 of file StringUtil.cs.

static string DXGfxLib.StringUtil.GetPathWithoutTrailingSlash | ( | string | fileName | ) | `[static]`

Same as GetPath except the return path does not contain any \ at the end.

Parameters:

  | fileName |

Returns:

Definition at line 171 of file StringUtil.cs.

static string DXGfxLib.StringUtil.GetPathWithoutTrailingSlash | ( | string | fileName | ) | `[static]`

Same as GetPath except the return path does not contain any \ at the end.

Parameters:

  | fileName |

Returns:

Definition at line 171 of file StringUtil.cs.

static string DXGfxLib.StringUtil.GetRelativePath | ( | string | basePath,
|  | string | fileName |
| ) |  |  | `[static]`

This static method removes the string passed as first argument from the string passed as second argument.

Parameters:

  | basePath | the string to remove from the other string.
  | fileName | the string to work on.

Returns:

Definition at line 98 of file StringUtil.cs.

static string DXGfxLib.StringUtil.GetRelativePath | ( | string | basePath,
|  | string | fileName |
| ) |  |  | `[static]`

This static method removes the string passed as first argument from the string passed as second argument.

Parameters:

  | basePath | the string to remove from the other string.
  | fileName | the string to work on.

Returns:

Definition at line 98 of file StringUtil.cs.

static string DXGfxLib.StringUtil.GetRelativePathWithoutStartingSlash | ( | string | basePath,
|  | string | fileName |
| ) |  |  | `[static]`

This static method removes the string passed as first argument from the string passed as second argument.

Parameters:

  | basePath | the string to remove from the other string.
  | fileName | the string to work on.

Returns:

Definition at line 123 of file StringUtil.cs.

static string DXGfxLib.StringUtil.GetRelativePathWithoutStartingSlash | ( | string | basePath,
|  | string | fileName |
| ) |  |  | `[static]`

This static method removes the string passed as first argument from the string passed as second argument.

Parameters:

  | basePath | the string to remove from the other string.
  | fileName | the string to work on.

Returns:

Definition at line 123 of file StringUtil.cs.

The documentation for this class was generated from the following files:

- D:/guillaume/guillara/3D/DXGfx/Backup/DXGfxLib/StringUtil.cs
- D:/guillaume/guillara/3D/DXGfx/DXGfxLib/StringUtil.cs