StringBufferExtensions Class

Provides extension methods for string buffer manipulation, cleaning, and parsing, specifically for device message and protocol handling.

Definition

Namespace: MobileTrack.Receiver.Extensions
Assembly: MobileTrack.Receiver (in MobileTrack.Receiver.exe) Version: 0.7+1dadc87dcf0a0f837e19a3ce2deb7c1cd85375d1
internal static class StringBufferExtensions
Inheritance
Object    StringBufferExtensions

Methods

CleanHashNoises Cleans up hash and noise characters from the buffer, normalizing frame separators and removing leading/trailing noise.
CleanMacAddress Cleans a MAC address string by removing whitespace, invalid characters, and normalizing separators.
RemoveCrLf Removes all carriage return ('\r') and line feed ('\n') characters from the string.
RemoveLeadingSpaceHash Removes a leading space followed by a hash (" #") from the start of the string, if present.
ReplaceDoubleHashNoise Replaces all occurrences of "##" with "#" in the string, repeatedly until none remain.
ReplaceInsideQuotes Replaces all occurrences of a substring inside quoted sections with a placeholder.
ReplaceSpaceHashNoise Replaces all occurrences of "# #" with "##" in the string, repeatedly until none remain.
ReplaceTripleHashNoise Replaces all occurrences of "###" with "##" in the string, repeatedly until none remain.
RestorePlaceholders Restores placeholders for hash and comma to their original characters.
SplitFrames Splits the buffer into frames using hash ('#') as a separator, respecting quoted sections. Filters out noise and only returns frames that start with a digit or a known command.
UnescapeQuotedString Removes outer quotes from a string and unescapes embedded double quotes.

See Also