having fun with code

Tag Archives: freemarker

Equivalent of parseInt() in Freemarker

Programming languages have methods to cast integers to strings and strings to integers, but usually is had to find equivalents to parseInt(), a Javascript function that basically removes all non-numeric characters from a string and returns the resulting integer. Today, while working on a Freemarker template, I had to convert strings like “40 ms.” and [...]

Regular expressions in Freemarker

At work we have our custom CMS (SWITCH) which uses Freemarker to create template-based pages. So far I had never needed this, but today I had to figure out how to strip all html tags from a text block. Well, nothing like a good RegEx for that :) Trimming an HTML block to 100 characters [...]

About the blog

This is a blog about development, focused mainly on Javascript but also other languages like python, shell scripts and more.

About the author

Eneko Alonso is a software engineer and UI developer with more than eight years of experience in software and web development. He lives in San Luis Obispo, California and works at LEVEL Studios.

Contact Info

Contact Info