String Manipulation Snippets


This MATLAB code snippet reads in a file stored in the current directory and stores specified lines from the file in a new cell array for manipulation in MATLAB.

02 November, 2014   

The RETURNING clause was implemented as part of the Oracle 10g release and is used to return information about the effected rows after issuing Data Manipulation Language (DML) statements.

11 October, 2011   

In the same way you often need to format data being sent from Flash, you sometimes need to format data being received. This function takes a string and removes all spaces from it. Here we use the split method of the String class to split the string into an Array and then call the join method of the Array class to convert it back to a string....

19 April, 2015   

Merges two strings in a way that a pattern like ABABAB will be the result.

This code will break a string of words up along the spaces and do a mySQL search for each of the words in the string.

This code will break a string of words up along the spaces and do a mySQL search for each of the words in the string.

04 February, 2013   

This removes every instance of a space in the given string returning the new string as a string for Visual Basic

This is a very common PHP question of HOW TO remove last character from string in PHP. Find below some ways how to delete last character from string in PHP.

This allows you to do String.random_alphanumeric(num) to get a random string that is num characters long. Useful for generating random identifier keys.

Passing in a simple string of text converting it to lowercase and replacing all the spaces with a dash

18 September, 2013   

If you don’t need human readable string, then use this function instead, which will create a random string you can use for user id’s etc.

17 July, 2018   

This function takes a string and an output buffer and a desired width.

28 February, 2013   

This function takes a string and an output buffer and a desired width.

Very useful Java code snippets for Java developers - Converting Strings to int and int to String

05 August, 2015   

Shows how to access the HTTP headers from a given web adress.

I was trying to pass an array through SWFObject flashvars and realized it can't be done. Instead you need to use a string for your array, pass it into Flash , then convert it to an array using the actionscript "split" function.

I was trying to pass an array through SWFObject flashvars and realized it can't be done. Instead you need to use a string for your array, pass it into Flash , then convert it to an array using the actionscript "split" function.

This basic snippet will create a random authentication code, or just a random string.

Five different ways to get the computer name in ASP.NET

02 March, 2013   

Java code example shown here how to convert a number to words