Skip to content

(.NET Framework CL) Class library ready to help you with string analysis and case converting

Notifications You must be signed in to change notification settings

perconey/StringEx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

StringEx

SE is a class library that delivers wide range of possibilites to your project when it comes to string analysis
and case conversion or validation. You can find more information about project and it's functionalities below.

Table of Contents

  • Number analysing methods
  • Boolean methods
  • Case Converting methods
  • Occurencies counting methods

Note

Every method in each class library is appointed with proper XML documentation comment
pp

Number Analysis

When it comes to calculating divisibility of very large numbers, for example over 20 digits
long, your program can get very laggy if there are more and more tasks to complete.
Here comes very handy technique of checking divisibility which involves analyzing just
couple of digits for example (%4) can be calculated by applying the following algorithm

Let's represent a seven digit number 6522148 as a sum of it's constituent digits:
(a1 * 1000000 + a2 * 100000 + a3 * 10000 + a4 * 1000 + a5 * 100 + a6 * 10 + a7 * 1)
After checking if provided string is a number and throwing an ArgumentException when it is not
apply following algorithm

( Char.GetNumericValue(a6) + Char.GetNumericValue(a7) ) % 4
a6 - (String.Lenght - 1)   a7 -(String.Lenght - 2)

For larger numbers, performance is higher than regular modulo operation for whole large number

About

(.NET Framework CL) Class library ready to help you with string analysis and case converting

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages