- Go to "Tools > NuGet Package Manager > Manage NuGet Packages for Solution"
- Go to "Browse" tab and search for "CSSimpleFunctions" and simply install the latest version
dotnet add package CSSimpleFunctions --version [latest release version]
Note: Remove the brackets for version
- will check a String for a number
- returns a boolean value
Check.HasNumbers("Sample text"); // returns false
Check.HasNumbers("Sample text 1"); // returns true
- will check a String for a symbol
- returns a boolean value
Check.HasSymbols("Sample text"); // returns false
Check.HasSymbols("Sample text!"); // returns true
- will check a String for a space
- returns a boolean value
Check.HasSpaces("Sample_text"); // returns false
Check.HasSpaces("Sample text"); // returns true
- will check a String if it is a valid Philippine mobile number
- returns a boolean value
Check.IsAValidPhilippineMobileNumber("+15551234567"); // returns false
Check.IsAValidPhilippineMobileNumber("09171234567"); // returns true
- adds a valid domain name to the list of valid domain names
Check.Email.AddValidDomainName("gmail");
- adds a valid domain extension to the list of valid domain extensions
Check.Email.AddValidDomainExtension("com");
- adds a valid domain to the list of valid domains
Check.Email.AddValidDomain("gmail.com");
- sets the checker to use full domains or not
Check.Email.ShouldUseFullDomain();
// Or
Check.Email.ShouldUseFullDomain(true);
// Or
Check.Email.ShouldUseFullDomain(false);
- checks a String if it is a valid email or not
- will return false if the email domain is not listed in the valid domains
Check.Email.IsValid("[email protected]"); // returns true
Check.Email.IsValid("[email protected]"); // returns false
Check.Email.IsValid("[email protected]"); // returns false
- will convert a String to its Base64 version
- returns a String
Convert.ToBase64("Sample text"); // returns "U2FtcGxlIHRleHQ="
- will convert a Base64 String to its normal version
- returns a String
Convert.FromBase64("U2FtcGxlIHRleHQ="); // returns "Sample text"
PyCS pycs = new PyCS();
// Or
PyCS pycs = new PyCS(true); // default value
PyCS pycs = new PyCS(false); // no console messages
- starts a pip install command
pycs.Pip(new string[]{"opencv-python"});
- runs a given Python script in a string value
pycs.Run("print('Hello')"); // prints "Hello" in the console
- runs a given Python script in a given file path
pycs.RunFile("scripts/hello.py"); // prints "Hello" in the console
- runs a given Python script in a string value and returns the console message in a string value
string text = pycs.GetOutput("print('Hello')"); // returns "Hello"
- runs a given Python script in a given file path and returns the console message in a string value
string text = pycs.GetFileOutput("scripts/hello.py"); // returns "Hello"