As I talked about earlier, I am beginning to learn Python. I thought that this could be a good opportunity to document what I am learning and share my thoughts, experience and code. To be totally cliche, I figured I would first demonstrate how to create the Hello World program in Python. The most simplistic… Read more »
Posts Tagged: function
One of my co-workers recently started working with Magento. Until recently he was primarily working in a custom system we had developed. One of the functions that he was very used to using was a debug function that simply was a wrapper for PHP’s print_r() that echoed out the beginning and ending pre tags. Now… Read more »
The str_replace function is used to replace part of a string with another string. The syntax of this PHP function is detailed below: <? mixed str_replace( $search, $replace, $subject, $count ); ?> $search – This can either be a string value or an array of strings. This will be the string or strings you want… Read more »
This will be a quick tutorial on how to remove the excess whitespace from the beginning and end of a string using jQuery. All you have to do is call the trim function like this: var new_string = jQuery.trim(string_to_trim); Just a quick look at a very basic function.