Class SpecialStrings
This class defines special purpose strings that are either difficult to get right in the first place, or display ambiguously in text editors and printed source code listings.
Since static classes are implicitly sealed, this class cannot be inherited.
Inheritance
Inherited Members
Namespace: WizardWrx
Assembly: WizardWrx.Common.dll
Syntax
public static class SpecialStrings
Remarks
For ease of access, I promoted the classes that expose only constants to the root of the WizardWrx namespace.
Fields
| Improve this Doc View SourceAMPERSAND
Use this when you need to remove or replace ampersand literals in a string.
Declaration
public const string AMPERSAND = "&"
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceASP_APP_DIR_DEFAULT_START_PAGE
A URI that ends with a forward slash calls forth this specially named page.
Declaration
public const string ASP_APP_DIR_DEFAULT_START_PAGE = "default.aspx"
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceASP_APP_START_PAGE_KEY
Key, in web.config, that contains the name of the application's start (home) page.
Declaration
public const string ASP_APP_START_PAGE_KEY = "StartPagePath"
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceASP_REL_EXEC_PATH_PREFIX
Relative path strings returned by the Request object begin with one of these.
Declaration
public const string ASP_REL_EXEC_PATH_PREFIX = "~/"
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceASP_RELATIVE_PATH_BEGIN
Relative path strings returned by the Request object begin with one of these.
Declaration
public const string ASP_RELATIVE_PATH_BEGIN = "~/"
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceASTERISK
Asterisks are everywhere; use this constant to make asterisks that are intended to be treated as characters unambiguous.
Declaration
public const string ASTERISK = "*"
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceASTERISK_CHAR
Both ASTERISK_CHAR and ASTERISK resolve to the same character.
Declaration
public const string ASTERISK_CHAR = "*"
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceAT_CHAR
Use this when your code requires a string composed of a single AT character literal, and you want the listing to be crystal clear about what it is.
Declaration
public const string AT_CHAR = "@"
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceAT_SIGN
Both AT_SIGH and AT_CHAR resolve to the same character.
Declaration
public const string AT_SIGN = "@"
Field Value
Type | Description |
---|---|
System.String |
Remarks
The '@' character has many uses in computing circles, mostly obscure ones, such as their use in many command line tools to denote that a specified file is not, itself, the object of interest, but is a list of files or other entities that are.
See Also
| Improve this Doc View SourceBACK2BACK_NEWLINES
Substitute this string for Environment.NewLine in formatted strings that were designed for output as console messages when you want or need to return them as long strings. The effect is the same as using Console.WriteLine in place of StringBuilder.AppendFormat.
Declaration
public const string BACK2BACK_NEWLINES = "\r\n\r\n"
Field Value
Type | Description |
---|---|
System.String |
BRACE_LEFT
Use this in your code to specify a left French brace, also called a left brace or opening brace, as a character literal.
Declaration
public const string BRACE_LEFT = "{"
Field Value
Type | Description |
---|---|
System.String |
Remarks
In addition to implementing DLM_FORMAT_ITEM_BEGIN for a specific use case, I implemented the generic use case and its twin, BRACE_RIGHT.
See Also
| Improve this Doc View SourceBRACE_RIGHT
Use this in your code to specify a right French brace, also called a right brace or closing brace, as a character literal.
Declaration
public const string BRACE_RIGHT = "}"
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceBRACKET_LEFT
Use this in your code to specify a left square bracket, also called an opening bracket, as a character literal.
Declaration
public const string BRACKET_LEFT = "["
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceBRACKET_RIGHT
Use this in your code to specify a right square bracket, also called a closing bracket, as a character literal.
Declaration
public const string BRACKET_RIGHT = "]"
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceCARRIAGE_RETURN
Use this character anywhere in your code that requires a bare carriage return character.
Declaration
public const string CARRIAGE_RETURN = "\\r"
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceCHAR_LC_I
Lower case I, for use in code, where it might be easily mistaken for a number 1 or a letter L.
Declaration
public const string CHAR_LC_I = "i"
Field Value
Type | Description |
---|---|
System.String |
CHAR_LC_L
Lower case L, for use in code, where it might be easily mistaken for a number 1 or a letter I.
Declaration
public const string CHAR_LC_L = "l"
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceCHAR_LC_O
Lower case O, for use in code where it might be easily mistaken for a number zero.
Declaration
public const string CHAR_LC_O = "o"
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceCHAR_LC_Z
Lower case Z, for use in code where it might be easily mistaken for a numeric character 2 or 7.
Declaration
public const string CHAR_LC_Z = "z"
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceCHAR_NUMERAL_0
Numeric character 0, for use in code where it might be mistaken for a letter O.
Declaration
public const string CHAR_NUMERAL_0 = "0"
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceCHAR_NUMERAL_1
Numeric character 1, for use in code where it might be mistaken for a lower case l or an upper case I.
Declaration
public const string CHAR_NUMERAL_1 = "1"
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceCHAR_NUMERAL_2
Numeric character 2, for use in code where it might be mistaken for a letter Z or a numeral 7.
Declaration
public const string CHAR_NUMERAL_2 = "2"
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceCHAR_NUMERAL_7
Numeric character 2, for use in code where it might be mistaken for a letter Z or a numeral 7.
Declaration
public const string CHAR_NUMERAL_7 = "7"
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceCHAR_UC_I
Upper case I, for use in code, where it might be easily mistaken for a number 1 or a letter L.
Declaration
public const string CHAR_UC_I = "I"
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceCHAR_UC_L
Upper case L, for use in code, where it might be easily mistaken for a number 1 or a letter I.
Declaration
public const string CHAR_UC_L = "L"
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceCHAR_UC_O
Upper case O, for use in code where it might be easily mistaken for a number zero.
Declaration
public const string CHAR_UC_O = "O"
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceCHAR_UC_Z
Upper case Z, for use in code where it might be easily mistaken for a numeric character 2 or 7.
Declaration
public const string CHAR_UC_Z = "Z"
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceCHECK_MARK_CHAR
The check-mark character prints as such only in selected Windows fonts.
Declaration
public const string CHECK_MARK_CHAR = "û"
Field Value
Type | Description |
---|---|
System.String |
COLON
This is one of many single characters that are frequently needed as single-character string constants.
Declaration
public const string COLON = ":"
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceCOMMA
This is one of many single characters that are frequently needed as single-character string constants.
Declaration
public const string COMMA = ","
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceCSV_ESCAPED_DOUBLE_QUOTE
Use this as the second of two argument so the Replace method on a String, along with DOUBLE_QUOTE as tthe first argument, when the double quotation mark must be embeddded in the value of a field in a CSV file.
Declaration
public const string CSV_ESCAPED_DOUBLE_QUOTE = "\"\""
Field Value
Type | Description |
---|---|
System.String |
DOUBLE_QUOTE
This is one of many single characters that are frequently needed as single-character string constants.
Declaration
public const string DOUBLE_QUOTE = "\""
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceDOUBLE_SPACE
Overlooked constant - two consecutive spaces.
Declaration
public const string DOUBLE_SPACE = " "
Field Value
Type | Description |
---|---|
System.String |
EMBEDDED_TAB
Tab characters, as they must be entered into resource (.RESX) strings.
Declaration
public const string EMBEDDED_TAB = "\\t"
Field Value
Type | Description |
---|---|
System.String |
EMPTY_STRING
I like having a way to initialize a constant to the empty string.
Declaration
public const string EMPTY_STRING = ""
Field Value
Type | Description |
---|---|
System.String |
See Also
EQUALS_SIGN
Use this constant when your code requires a literal equals sign.
Declaration
public const string EQUALS_SIGN = "="
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceERRMSG_SUCCESS_PLACEHOLDER
Since ErrorExit is never invoked for ERROR_SUCCESS, and the table of error messages is indexed by status code, this string holds its spot in the table of error messages, but is never rendered. Hence, it can be kept out of the managed string resources for applications. This string is publicly accessible through a static method exported by this library, ExceptionLogger.GetSpecifiedReservedErrorMessage.
Declaration
public const string ERRMSG_SUCCESS_PLACEHOLDER = "ERROR_SUCCESS Placeholder"
Field Value
Type | Description |
---|---|
System.String |
Remarks
A related managed string resource, ERRMSG_SUCCESS, is available for public consumption; use it in lieu of this string for I18N.
Two other strings, ERRMSG_RUNTIME and ERRMSG_INVALID_COMMAND_LINE, are also defined in this assembly.
See Also
| Improve this Doc View SourceFULL_STOP
This is one of many single characters that are frequently needed as single-character string constants.
Declaration
public const string FULL_STOP = "."
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceHASH_TAG
Use this constant to specify a hash-tag literal character
Declaration
public const string HASH_TAG = "#"
Field Value
Type | Description |
---|---|
System.String |
HTML_COMMENT_PREFIX
Minimal HTML (and XML) comment prefix string.
Declaration
public const string HTML_COMMENT_PREFIX = "<!--"
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceHTML_COMMENT_PREFIX_SP
HTML (and XML) comment prefix string, followed by a single space.
Declaration
public const string HTML_COMMENT_PREFIX_SP = "<!-- "
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceHTML_COMMENT_SUFFIX
Minimal HTML (and XML) comment suffix string.
Declaration
public const string HTML_COMMENT_SUFFIX = "-->"
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceHTML_COMMENT_SUFFIX_SP
HTML (and XML) comment suffix string, preceded by a single space.
Declaration
public const string HTML_COMMENT_SUFFIX_SP = " -->"
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceHTML_LINE_BREAK_LC
HTML line break (Break) tag, rendered as lower case characters.
Declaration
public const string HTML_LINE_BREAK_LC = "<br>"
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceHTML_LINE_BREAK_UC
HTML line break (Break) tag, rendered as upper case characters
Declaration
public const string HTML_LINE_BREAK_UC = "<BR>"
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceHTML_NOLBREAKING_SPACE_UC
HTML nonbreaking space entity, rendered as upper case characters.
Declaration
public const string HTML_NOLBREAKING_SPACE_UC = "&NBSP;"
Field Value
Type | Description |
---|---|
System.String |
HTML_NONBREAKING_SPACE
Web Developers are always needing a non-breaking space, for use as filler, especially in dynamically generated tables.
Declaration
public const string HTML_NONBREAKING_SPACE = " "
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceHTML_NONBREAKING_SPACE_LC
HTML nonbreaking space entity, rendered as lower case characters.
Declaration
public const string HTML_NONBREAKING_SPACE_LC = " "
Field Value
Type | Description |
---|---|
System.String |
HTML_PARAGRAPH_CLOSE_TAG_LC
HTML paragraph closing tag, rendered as lower case characters.
Declaration
public const string HTML_PARAGRAPH_CLOSE_TAG_LC = "</p>"
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceHTML_PARAGRAPH_CLOSE_TAG_UC
HTML paragraph closing tag, rendered as upper case characters.
Declaration
public const string HTML_PARAGRAPH_CLOSE_TAG_UC = "</P>"
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceHTML_PARAGRAPH_OPEN_TAG_LC
HTML paragraph opening tag, rendered as lower case characters.
Declaration
public const string HTML_PARAGRAPH_OPEN_TAG_LC = "<p>"
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceHTML_PARAGRAPH_OPEN_TAG_UC
HTML paragraph opening tag, rendered as upper case characters.
Declaration
public const string HTML_PARAGRAPH_OPEN_TAG_UC = "<P>"
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceHYPHEN
This is one of many single characters that are frequently needed as single-character string constants.
Declaration
public const string HYPHEN = "-"
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceLAST_ASCII_CHAR
The highest integer that can represent any ASCII character is 255, which is all 8 bits turned ON.
Declaration
public const string LAST_ASCII_CHAR = "ÿ"
Field Value
Type | Description |
---|---|
System.String |
LINEFEED
Use this character anywhere in your code that requires a bare linefeed character.
Declaration
public const string LINEFEED = "\n"
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceLOCALHOST
The DNS name of the local loop-back is always "localhost".
Declaration
public const string LOCALHOST = "localhost"
Field Value
Type | Description |
---|---|
System.String |
LOCALHOST_IP_ADDR
The local loop-back has the reserved IP address of 127.0.0.1.
Declaration
public const string LOCALHOST_IP_ADDR = "127.0.0.1"
Field Value
Type | Description |
---|---|
System.String |
LOGICAL_NEGATE
Thanks to a suggestion from my esteemed colleague Bud Pass, this is my new preferred field delimiter character. It supersedes my favorite for many years, PIPE_CHAR.
Declaration
public const string LOGICAL_NEGATE = "¬"
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceNONBREAKING_SPACE_CHAR
The non-breaking space character doesn't print; although the Unicode encoding treats it as a white space character, most other encodings, including both Unicode and US-ASCII, do not.
Declaration
public const string NONBREAKING_SPACE_CHAR = " "
Field Value
Type | Description |
---|---|
System.String |
OUTPUT_TAB
Tab characters, as they must appear in the string before it can be used.
Declaration
public const string OUTPUT_TAB = "\t"
Field Value
Type | Description |
---|---|
System.String |
PARENTHESIS_LEFT
Use this in your code to specify a left parenthesis, also called an opening parenthesis, as a character literal.
Declaration
public const string PARENTHESIS_LEFT = "("
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourcePARENTHESIS_RIGHT
Use this in your code to specify a right parenthesis, also called a closing parenthesis, as a character literal.
Declaration
public const string PARENTHESIS_RIGHT = ")"
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourcePERCENT_SIGN
Use this when you need to remove or replace ampersand literals in a string.
Declaration
public const string PERCENT_SIGN = "%"
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourcePIPE_CHAR
How have I got on this long without my faithful field separator?
Declaration
public const string PIPE_CHAR = "|"
Field Value
Type | Description |
---|---|
System.String |
See Also
QUESTION_MARK
The question mark is another special character that is frequently used as an operator; use this to differentiate such use from that of an operand.
Declaration
public const string QUESTION_MARK = "?"
Field Value
Type | Description |
---|---|
System.String |
SEMICOLON
This is one of many single characters that are frequently needed as single-character string constants.
Declaration
public const string SEMICOLON = ";"
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceSINGLE_QUOTE
This is one of many single characters that are frequently needed as single-character string constants.
Declaration
public const string SINGLE_QUOTE = "'"
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceSPACE_CHAR
Use this when you need a space character in a context that requires a string representation.
Declaration
public const string SPACE_CHAR = " "
Field Value
Type | Description |
---|---|
System.String |
Remarks
Heretofore, I have made do with the ToString method on the like-named character, but it annoyed me whenever I did so because I wanted th use a real constant.
See Also
| Improve this Doc View SourceSPACING_TEMPLATE
Use this template when you need to either precede or follow a line of otherwise static text with a newline.
Declaration
public const string SPACING_TEMPLATE = "{0}{1}"
Field Value
Type | Description |
---|---|
System.String |
SQL_DATE_FORMAT
This string is the standard representation of a date by itself.
Declaration
public const string SQL_DATE_FORMAT = "MM-dd-yyyy"
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceSQL_DATETIME_FORMAT_FULL
This string is the standard representation of a date and time to the nearest second.
Declaration
public const string SQL_DATETIME_FORMAT_FULL = "MM-dd-yyyy HH:mm:ss"
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceSQL_DATETIME_FORMAT_PRECISE
This string is the most precise string representation of the format of a SQL Server date.
Declaration
public const string SQL_DATETIME_FORMAT_PRECISE = "MM-dd-yyyy HH:mm:ss.fff"
Field Value
Type | Description |
---|---|
System.String |
Remarks
Since date literals must be enclosed in single quotation marks, the formatted date value must be embedded in a string literal by interpolation or by way of a format item token. Regardless, the single quotes must be part of the string because including them in the format string invalidates it, causing ToString and its friends to render the format string as prescribed, rather than replacing it with the date value.
See Also
| Improve this Doc View SourceSQL_ESCAPED_SINGLE_QUOTE
Use this as the second of two argument so the Replace method on a String, along with SINGLE_QUOTE as tthe first argument, to replace single quotation marks that appear in the value of a column or a stored procedure parameter appears in a SQL script.
Declaration
public const string SQL_ESCAPED_SINGLE_QUOTE = "''"
Field Value
Type | Description |
---|---|
System.String |
STRING_SPLIT_CARRIAGE_RETURN
Use this string as the solitary element of an array of strings to split a string that contains text from a file of lines delimited by carriage returns only.
Declaration
public const string STRING_SPLIT_CARRIAGE_RETURN = "\r"
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceSTRING_SPLIT_LINEFEED
Use this string as the solitary element of an array of strings to split a string that contains text from a file of lines delimited by line feeds only.
Declaration
public const string STRING_SPLIT_LINEFEED = "\n"
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceSTRING_SPLIT_NEWLINE
Use this string as the solitary element of an array of strings to split a string that contains text from a file into an array of strings, each element of which is a line of text, stripped of its line ending, if any.
Declaration
public const string STRING_SPLIT_NEWLINE = "\r\n"
Field Value
Type | Description |
---|---|
System.String |
See Also
TAB_CHAR
This is one of many single characters that are frequently needed as single-character string constants.
Declaration
public const string TAB_CHAR = "\t"
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceTWO_SPACES
Render two back-to-back spaces.
Declaration
public const string TWO_SPACES = " "
Field Value
Type | Description |
---|---|
System.String |
See Also
| Improve this Doc View SourceUNDERSCORE_CHAR
This is one of many single characters that are frequently needed as single-character string constants.
Declaration
public const string UNDERSCORE_CHAR = "_"
Field Value
Type | Description |
---|---|
System.String |