Return Text Snippets


Convert a string of text and ad hyperlinks to all the URLs. We loop through each URL and add a hyperlink

Append Non-Breaking Space Between Last Two Words

Encodes the given data with MIME base64. Base64-encoded data takes about 33% more space than the original data.

Source code for KMP String Search Algorithm

29 April, 2015   

Advanced "Go to Top" link using JavaScript and HTML anchors

This is the kind of function every web developer should have in their toolbox for future use: give it a string, a start, and an end, and it will return the text contained with $start and $end.

05 August, 2014   

PHP code example to highlight words in a string.

05 January, 2013   

Here shown how to hide text with text indent

22 March, 2014   

You can display your link description in the status bar of your browser.

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

Several hundred user notes on the str_replace page later, and we have a function that provides a variety of text highlighting options for plaintext or HTML strings.

13 December, 2011   

You can use to find and replace text in a variable. This script created by Bruce Phillips, one of the leading posters at MacScripter.

13 June, 2016   

As a "preview" of text, this MySQL select will return the first few words out of a text field in a database. It returns entire words (doesn't cut them off in the middle) and follows the last word with an elipse "..."

Confirm a deletion (or any action) with Javascript.

04 May, 2013   

C++ code example shown here how to write to text file.

When using forms within your web site, there may be times when you will want to include an example of what you'd like your visitors to fill in your form field. Although you could place some default text within your form field, your users would need to delete the default text in order to type in their own information.

23 March, 2011   

When using forms within your web site, there may be times when you will want to include an example of what you'd like your visitors to fill in your form field. Although you could place some default text within your form field, your users would need to delete the default text in order to type in their own information.

Hiding text can be extremely useful to hide company logo.

Visual Basic code for inverting text with simple code. Very easy for all beginners. Easy to understand. Compatibility: VB 6 Author of the code: Ben - Ezrah Mansilla Declarations: Add two text box with default name One command with default name

If you want to interact with the popular social messaging site, you’ll enjoy this function for sure, which will allow you to truncate your message to 140 characters.