JJ.Framework.Text 1.5.6877.41321

Prefix Reserved
dotnet add package JJ.Framework.Text --version 1.5.6877.41321                
NuGet\Install-Package JJ.Framework.Text -Version 1.5.6877.41321                
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="JJ.Framework.Text" Version="1.5.6877.41321" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add JJ.Framework.Text --version 1.5.6877.41321                
#r "nuget: JJ.Framework.Text, 1.5.6877.41321"                
#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 JJ.Framework.Text as a Cake Addin
#addin nuget:?package=JJ.Framework.Text&version=1.5.6877.41321

// Install JJ.Framework.Text as a Cake Tool
#tool nuget:?package=JJ.Framework.Text&version=1.5.6877.41321                

JJ.Framework.Text

Basic helpers for working with text.

  • String extensions for trimming and cutting.
  • Case formatting
  • String.Split overloads
  • SplitWithQuotation
  • StringBuilderWithIndentation

String Extensions

  • Left / Right
    • Returns the left or right part of a string. Throws an exception if the string has less characters than the length provided.
  • FromTill
    • Takes the middle of a string by specifying the zero-based start index and the end index. Throws an exception if the string has less characters than the length provided.
  • TakeStart / TakeEnd
    • Returns the left or right part of a string. Can return less characters than the length provided, if string is shorter.
  • TakeStartUntil / TakeEndUntil
    • Takes the part of a string until the specified delimiter. Excludes the delimiter itself.
  • TrimStart / TrimEnd
    • Will trim off repetitions of the same value from the given string. These are variations of the standard .NET methods that instead of just taking char[] can take a string or a length.
  • TrimStartUntil / TrimEndUntil
    • Cuts off the part of a string until the specified delimiter and returns what remains including the delimiter itself.
  • TrimFirst / TrimLast
    • Will trim off at most one occurrence of a value from the given string.
  • RemoveExcessiveWhiteSpace
    • Trims and replaces sequences of two or more white space characters by a single space.
  • Repeat
    • Repeat a string a number of times, returning a single string.
  • Replace
    • Variation on String.Replace with the ability to ignore case.

String Extensions for Case Formatting

  • StartWithCap
    • Turns the first character into a capital letter.
  • StartWithLowerCase
    • Turns the first character into a lower-case letter.
  • ToCamelCase
    • Converts e.g. "This is a sentence." to "thisIsASentence" so it can be used in code.

SplitWithQuotation

Allows you to parse CSV-like lines including quotation for the ability to include the separator character in the values themselves.

String Split Variations

The notoriously missing String.Split overloads, like:

myString.Split("].");

StringBuilderWithIndentation

You would think StringBuilder might have an Indent and an Unindent method. It doesn't. Here's one that does:

var sb = new StringBuilderWithIndentation();

sb.AppendLine($"public class {generatedClassName}");
sb.AppendLine("{");
sb.Indent();
{
    sb.AppendLine("public void MyMethod()");
    sb.AppendLine("{");
    sb.Indent();
    {
        sb.AppendLine(methodBody);
        sb.Unindent();
    }
    sb.AppendLine("}");
    sb.Unindent();
}
sb.AppendLine("}");

StringHelper.Join

A variation on String.Join, but takes char as the separator instead of String.

Product Compatible and additional computed target framework versions.
.NET Framework net461 is compatible.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages (5)

Showing the top 5 NuGet packages that depend on JJ.Framework.Text:

Package Downloads
JJ.Framework.Reflection

Expressions like "myParam.MyList[i].MyProperty" can be converted to text or their value retrieved or info like { "MyMethod", Parameters = { "myParameter", int, 3 } } Accessor IsIndexer IsNullableType IsProperty IsReferenceType IsStatic IsSimpleType IsDefault GetBaseClasses GetImplementations GetItemType GetPropertyOrException GetUnderlyingNullableTypeFast TypesFromObjects. ReflectionCache with fast GetProperties GetFields GetConstructor GetTypeByShortName. Overloads for PropertInfo.GetValue IsAssignableFrom IsAssignableTo CreateInstance.

JJ.Framework.Exceptions

Contains many exception classes for common basic errors. Clear messages, concise syntax, strongly-typed, good performance. Generates messages like "myParent.MyChildren[0].MyProperty is null.", "height of 2 is less than 10.", "Customer with key { customerNumber = 1234, customerType = Subscriber } not found."

JJ.Framework.Xml

XmlToObjectConverter converts an XmlDocument or string to an object graph. The way to map XML to classes is easier than the classic ways in .NET. XmlHelper allows you to access XML in a null-safe and multiplicity-safe way. It uses XmlDocument as the underlying .NET API.

JJ.Framework.IO

CsvReader FileLock PathParser SafeFileOverwriter GetNumberedFilePath StreamToBytes BytesToStream StreamToString StringToStream StringToBytes BytesToString ReadStruct WriteStruct ClearFolder ClearFolderRecursive GetFolderSize GetFolderSizeRecursive CountFilesRecursive IsFolder IsFile FolderIsEmpty IsReadOnly IsHidden MakeReadOnly MakeWritable ShowFile HideFile ToAbsolutePath ToRelativePath PathsAreEqual AssertFileExists

JJ.Framework.Business

Classes to support a business logic layer or an API. Keep child-parent relationships in sync. Wrap a result with data along with a Successful flag and a list of messages. Keep business logic units separate, implementing ISideEffect. Check whether a list is dirty.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.5.6877.41321 3,013 10/31/2018
1.4.6869.43189 721 10/22/2018
1.4.6869.43111 730 10/22/2018
1.4.6869.42917 696 10/22/2018
1.4.6869.42092 710 10/22/2018
1.4.6862.40435 34,483 10/15/2018
1.3.6683.35352 1,508 4/19/2018
1.2.6640.38990 6,559 3/7/2018
1.1.0.31223 6,944 3/4/2018
1.0.6633.36116 944 2/28/2018
1.0.6632.42021 964 2/27/2018
1.0.6632.41567 855 2/27/2018
1.0.6632.38204 940 2/27/2018
1.0.6632.36514 864 2/27/2018
1.0.0.41311 1,010 2/26/2018
1.0.0 12,276 2/25/2018