Rop.String 1.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Rop.String --version 1.0.1
NuGet\Install-Package Rop.String -Version 1.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Rop.String" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Rop.String --version 1.0.1
#r "nuget: Rop.String, 1.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Rop.String as a Cake Addin
#addin nuget:?package=Rop.String&version=1.0.1

// Install Rop.String as a Cake Tool
#tool nuget:?package=Rop.String&version=1.0.1

Rop.String

Features

Rop.String includes Helper extension classes to manipulate strings.

Char Helper

Helper class char relative

/// Is Equal with case option
public static bool IsEqualCase(this char a, char b, bool ignoreCase = true);
/// Check if a char is included in a char range with case option
public static bool InRange(this char a, IEnumerable<char> range, bool ignoreCase = false);
/// Check if a char is NOT included in a char range with case option
public static bool NotInRange(this char a, IEnumerable<char> range, bool ignoreCase = false);
/// Create a char range from a char to another
public static IEnumerable<char> RangeChar(char from, char to);
/// Create a char range from a char and count elements
public static IEnumerable<char> RangeChar(char from, int count);
/// Trim blank characters (includes carriage returns)
public static string TrimBlanks(this string s);
/// Trim control characters
public static string TrimControl(this string s);

HexString Helper

Helper class hexadecimal strings relative

/// Unicode string to Hex (WideChar)
public static string ToHexStringW(this string str);
/// Hex to Unicode String (Wide)
public static string FromHexStringW(this string hexString);
/// Ascii String to Hex (Byte char)
public static string ToHexString(this string str);
/// Hex String to Ascii String
public static string FromHexString(this string hexString);

StringBuilder helper

Helper class relative to StringBuilder

/// Append Line with linux end of line
public static StringBuilder AppendUnixLine(this StringBuilder std, string value);
/// Append linux end of line
public static StringBuilder AppendUnixLine(this StringBuilder std);

StringCase helper

Helper class relative to Uppercase and Lowercase and Diacritics

/// Remove Diacritics from text
public static string RemoveDiacritics(this string text);
/// Remove diacritics and Lower string
public static string RemoveDiacriticsAndLower(this string text);
/// String starts with (no case)
public static bool StartsWithNoCase(this string a, string b);
/// String ends with (no case)
public static bool EnsWithNoCase(this string a, string b);
/// Equals no case
public static bool EqualsNoCase(this string a, string b);

StringExtracts helper

Helper class relative to Extract substrings

/// Try extract substring from string
public static bool TryExtract(this string a, string prefix, string suffix,bool trim, StringComparison comparer,out string result);
public static bool TryExtract(this string a, string prefix, string suffix, out string result);
public static bool TryExtract(this string a, string prefix, string suffix, bool trim, out string result);
public static bool TryExtract(this string a, string prefix, string suffix, StringComparison comparer,out string result);
/// Try extract substring from string (no case);
public static bool TryExtractNoCase(this string a, string prefix, string suffix, bool trim, out string result);
public static bool TryExtractNoCase(this string a, string prefix, string suffix, out string result);
/// Try extract substring from strins between two strings
public static string Between(this string cad, string left, string right,bool ignorecase = false);
/// Get left part of a string
public static string LeftTo(this string cad, string sep, bool ignorecase = false);
/// Get right part of a string
public static string RightTo(this string cad, string sep, bool ignorecase = false);
/// Breaks a string in two parts
public static (string, string) Break(this string cad, string separator, bool ignorecase = false);
/// Break a string representing a domain account
public static (string Domain, string User) StripDomain(string cad);
/// Get user part of a string representing a domain account ensuring domain name
public static string StripDomain(string cad,string ensuredomain);

String helper

General string helper

/// StartsWith including end index
public static bool StartsWith(this string a,string b, StringComparison comparer, out int endindex);
/// EndsWith including begin index
public static bool EndsWith(this string a, string b, StringComparison comparer, out int beginindex);
/// Check if string starts and ends with a prefix and a suffix and returns index of both
public static bool StartsAndEndsWith(this string a, string b,string c, StringComparison comparer, out int from,out int to);
/// Return a substring or empty if parameters out of index
public static string SafeSubstring(this string cad, int from);
/// Return a substring or empty if parameters out of index
public static string SafeSubstring(this string cad, int from, int length, bool spaces = false);
/// Append all strings in a array
public static string ConcatLines(params string[] cads);
/// Return another string if string is null or empty
public static string IfNullOrEmpty(this string cad, string value);
/// Return another string if string is null or empty or whitespace
public static string IfNullOrWhiteSpace(this string cad, string value);
/// Create a dummy string with maximun value
public static string StringMax { get; } = new string(char.MaxValue, 8);
/// Check if string is digit only
public static bool IsDigitOnly(this string cad);
/// Check if cad represents a integer
public static bool IsInteger(this string cad);
/// Get substring beetween two positions.
public static string Between(this string cad, int left, int right, bool spaces = false);
/// Conver bool value into StringComparison value
public static StringComparison ToIgnoreCase(this bool c);

Token helper

String helper to parsing strings

/// Check if a symbol is present in a position
public static string SymbolInPos(this string cad, int pos, IEnumerable<string> symbols, bool ignorecase = false);
public static string SymbolInPos(this string cad, int pos, params string[] symbols);
/// Extract token from string
public static string GetToken(string[] separator, ref string cad, bool ignorecase = false);
/// Check if a string contains a substring
public static bool ContainsCase(this string cad, string search, bool ignorecase = false);   

(C)2022 Ramón Ordiales Plaza

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.3 407 8/25/2022
1.0.2 417 2/7/2022
1.0.1 393 2/6/2022