Skip to content
This repository was archived by the owner on Aug 22, 2019. It is now read-only.

String pad left and right by bytes, align (cut & pad) left and right by bytes.

License

Notifications You must be signed in to change notification settings

ryans610/CSharp-String-Extensions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

C#-String-Extensions

String pad left and right by bytes, align (cut & pad) left and right by bytes.

Language

C#

How to Use

Download StringExtension.cs file and add it into project, or download StringExtension.dll and add referance to project, and using namespace CustomExtensions.

Four method:

  • PadRightBytes
  • PadLeftBytes
  • AlignRightBytes
  • AlignleftBytes

e.g.

static void Main(string[] args)
{
    string str = "ABCDE測試";
    int i = 8;
    str = str.AlignRightBytes(i, 'Z');
    Console.WriteLine(str);
    Console.ReadLine();
}

Result will be: ABCDE測Z

About

String pad left and right by bytes, align (cut & pad) left and right by bytes.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages