Developer Resources for AbleCommerce eCommerce platform
CommerceBuilder.Utility Namespace / StringHelper Class / FixSearchPattern Method / FixSearchPattern(String,Boolean) Method
The pattern to search for.
Only applicable if search pattern does not contain wildcards. If true the method generates a substring match pattern; if false it generats a "starts with" match pattern.
In This Topic
    FixSearchPattern(String,Boolean) Method
    In This Topic
    Converts a string input into a SQL search pattern.
    Syntax
    public static string FixSearchPattern( 
       string searchPattern,
       bool substring
    )

    Parameters

    searchPattern
    The pattern to search for.
    substring
    Only applicable if search pattern does not contain wildcards. If true the method generates a substring match pattern; if false it generats a "starts with" match pattern.

    Return Value

    A string suitable for use with the SQL LIKE operator.
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also