DevTreks.Data/Helpers/GeneralHelpers.cs
/// <summary>
/// Retrieve a starting full sub string from a full string 
/// based on the name passed in
/// </summary>
/// <param name="fullString"></param>
/// <param name="nameToFind"></param>
/// <param name="fullSubString"></param>
Retrieve a starting full sub string from a full string
based on the name passed in
Retrieve a starting full sub string from a full string based on the name passed in
public static void GetStartSubstring(string fullString,
            string nameToFind, out string fullSubString)
        {
            fullSubString = string.Empty;
            int iStartIndex = fullString.LastIndexOf(nameToFind);
            if (iStartIndex >= 0)
            {
                int iFullIndex = iStartIndex + nameToFind.Length + 1;
                fullSubString = fullString.Substring(0, iFullIndex);
            }
            else
            {
                fullSubString = fullString;
            }
        }
public static void GetStartSubstring ( string fullString , string nameToFind , out string fullSubString ) { fullSubString = string . Empty ; int iStartIndex = fullString . LastIndexOf ( nameToFind ) ; if ( iStartIndex >= 0 ) { int iFullIndex = iStartIndex + nameToFind . Length + 1 ; fullSubString = fullString . Substring ( 0 , iFullIndex ) ; } else { fullSubString = fullString ; } }
Retrieve a starting full sub string from a full string
based on the name passed in
Retrieve a starting full sub string from a full string based on the name passed in
//typically used to retrieve ancestor file paths  //nameToFile = directory of current uri, string.concat(uri.URINodeName, "_", uri.URIId) //add the name and the path delimiter //return the full string
fullString
string
None
nameToFind
string
None
string
out
fullSubString
None