Show / Hide Table of Contents

    Class StringExtensionMethods

    Handy string extensions for parsing text

    Inheritance
    System.Object
    StringExtensionMethods
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace:AzureFunctionsForSharePoint.Common
    Assembly:AzureFunctionsForSharePoint.Common.dll
    Syntax
    public static class StringExtensionMethods

    Methods

    | Improve this Doc View Source

    GetInnerText(String, String, String)

    Returns the text between the first case sensitive instances of a given preamble and postscript or an empty string.

    Declaration
    public static string GetInnerText(this string input, string preamble, string postscript)
    Parameters
    Type Name Description
    System.String input

    The string to parse

    System.String preamble

    The beginning string to match

    System.String postscript

    The ending string to match

    Returns
    Type Description
    System.String

    The string between the preamble and postscript or nothing

    | Improve this Doc View Source

    GetInnerText(String, String, String, Boolean)

    Returns the text between the first case insensitive instances of a given preamble and postscript or an empty string.

    Declaration
    public static string GetInnerText(this string input, string preamble, string postscript, bool ignoreCase)
    Parameters
    Type Name Description
    System.String input

    The string to parse

    System.String preamble

    The beginning string to match

    System.String postscript

    The ending string to match

    System.Boolean ignoreCase

    Ignore the case of the preamble and postscript if true

    Returns
    Type Description
    System.String

    The string between the preamble and postscript or nothing

    | Improve this Doc View Source

    GetInnerTextList(String, String, String, Boolean)

    Returns a list of strings from a string between the instances of given preamble and postscript pairs or an empty list.

    Declaration
    public static List<string> GetInnerTextList(this string input, string preamble, string postscript, bool ignoreCase)
    Parameters
    Type Name Description
    System.String input

    The string to parse

    System.String preamble

    The beginning string to match

    System.String postscript

    The ending string to match

    System.Boolean ignoreCase

    Ignore the case of the preamble and postscript if true

    Returns
    Type Description
    System.Collections.Generic.List<System.String>

    A list of strings

    • Improve this Doc
    • View Source
    Back to top Copyright © 2016 InstantQuick
    View project on Github