String Handling Snippets

This function takes in two strings (value,key) and uses XOR encryption to encrypt (and decrypt) the value using the key. it returns the encrypted value as a C++ string. by John Shao

08 June, 2013   

Checks if the given encoding supports all the characters in the given string

Assigns the contents of a "url" to the string variable "result".

14 February, 2012   

MySQL code to connect to db. Don't forget to change the parameters.

If a string is contained in another string and you need to search for it, this is a very clever way to do it:

A project that needs to clear all non-alphabetical figures in a String and separating it every 60 characters(new line after 60 characters)..

I would like to find the position of the last occurrence of a character in a string and print every thing after that.

07 April, 2013   

Search a body of text for the most common words

15 December, 2011   

Here shown Java code example - The protected keyword

02 February, 2013   

An array that could dynamically adjust its size for a fluctuating capacity by SunnyD

Truncate or limit a text string while still preserving any HTML tags present. The code auto-closes the tags.

15 May, 2012   

VB.NET Code example for querystring validation

Tries to make out of the given string a xhtml-compatible string, that means that the return-string could be wrapped within a xml.

19 December, 2012   

Example shown here how to convert String to Date in Java

Due to the default Windows handling of the WM_GETMINMAXINFO message, the max size of the form is set to the screen size. Add a button to a form and try this:

Example shown here how to convert a PHP array into a string

Define allowed characters in $s and length for the string in $l

04 October, 2012   

Turn a string into a readable url

Ever wondered how Visual Studio executes a process - such as a compiler - and displays the text it returns in its own window? It's actually really easy - and here's a simple example as to how.

28 January, 2013   

Converts integer to left-zero padded string, len chars long.