Show / Hide Table of Contents

Class StringExtensions

Extension for the string type

Inheritance
object
StringExtensions
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: FpAssistantCore.General
Assembly: FpAssistantCoreScl.dll
Syntax
public static class StringExtensions

Methods

View Source

ReplaceAtPosition(string, int, string)

Replace a section if text in a string with more text at a given position

Declaration
public static string ReplaceAtPosition(this string self, int position, string newValue)
Parameters
Type Name Description
string self

Existing string content

int position

Position in string to remove from

string newValue

Text to be inserted in existing string

Returns
Type Description
string

Revised string with removed and replaced text

Exceptions
Type Condition
NullReferenceException

If either parameter is null

View Source

ToIA5Byte(char)

Conversion of char to byte using 6 lower bits

Declaration
public static byte ToIA5Byte(this char character)
Parameters
Type Name Description
char character
Returns
Type Description
byte

Byte value of the char passed

Remarks

International Alphabet No. 5 (IA-5) is defined in ISO 646:1991 IRV and is identical to ASCII, but only the lower 6 bits of the value are used(bits 7/8 are zeroed). However, the PCL platform doesn't support Encoding.ASCII, but fortunately, UTF-8 encoding is identical for 7-bit characters(0-7F) so fits the bill for our purposes.

  • View Source
In this article
Back to top Copyright 2018-2025 CADology Limited