Training, Open Source Programming Languages

This is page

Our email: • Phone: 01144 1225 708225

For 2021 - online Python 3 training - see ((here)).

Our plans were to retire in summer 2020 and see the world, but Coronavirus has lead us into a lot of lockdown programming in Python 3 and PHP 7.
We can now offer tailored online training - small groups, real tutors - works really well for groups of 4 to 14 delegates. Anywhere in the world; course language English.

Please ask about private 'maintenance' training for Python 2, Tcl, Perl, PHP, Lua, etc.
Lua module U104
Strings and the String library.
Exercises, examples and other material relating to training module U104. This topic is presented on public courses Learning to program in Lua, Lua Programming, Lua Programming

Articles and tips on this subjectupdated
4274String formatting in Lua - string.format as a wrapper for sprintf
Lua is a small language - and so for some elements of its functionallity it uses wrappers around underlying C functions rather than re-implementing and duplicating logic. A good example is the string.format function which in essence is a wrapper around sprintf. For example:   thing = string.format("> ...
2500Dynamically formatting your results (Lua)
Scenario: You're producing a short (text) table of results and you want to keep it reasonably small - not a great deal of white space, but the data in some of your columns differs dramatically from one set of results to another. How can you do it? Discussion: You can use your traditional "printf" ...
2357Checking if the user has entered a number (Lua)
In Lua, there's a difference between 0 and nil - and that means that you can easily code to ask your user to enter a number, testing the result and allowing him to enter zero as a legitimate value. That may sound like it's no big deal, but you don't want a loop to exit on a premature 0. Here's code ...
2348Finding literals rather than patterns in Lua
Lua's string.find looks for a PATTERN ... it's not as big an sophisticated as a regular expression match (but then it's got nothing like as big a footprint!), but neither is it a literal match. So if I want to search a string for - literally - a ".", I need to protect it. I can do this either with ...
1744Lua examples, Lua Courses
Programming training is much more effective if the delegates are shown how a particular program is written, rather than just the final result ... show them just the final result and they'll ask "but how did you come up with that?" So whenever possible, I write new examples in front of my delegates - ...
Examples from our training material
ee   Excercise to print out exchange rate table
gimme   Reading from the keyboard and string basics
kiddos   Spread money gift around a group of children
kids   String formatting
mlx   Single and multiline strings
moopark   Answer to excercise - Theme park takings
qbs   backslash specials in character strings and other basics
s2   Finding literal strings
sf   string.format
splitter   Using string.find and string.sub to split
stem   Basic String functionality
three   Wait until a NUMBER has been entered
two   Checking a NUMBER has been entered
ul   Use of string.rep
Background information
Some modules are available for download as a sample of our material or under an Open Training Notes License for free download from [here].
Topics covered in this module
Double and single quotes, square brackets and backslashes.
String concat, length, etc
Formatting numbers in to strings.
String Conversion Functions.
Complete learning
If you are looking for a complete course and not just a information on a single subject, visit our Listing and schedule page.

Well House Consultants specialise in training courses in Ruby, Lua, Python, Perl, PHP, and MySQL. We run Private Courses throughout the UK (and beyond for longer courses), and Public Courses at our training centre in Melksham, Wiltshire, England. It's surprisingly cost effective to come on our public courses - even if you live in a different country or continent to us.

We have a technical library of over 700 books on the subjects on which we teach. These books are available for reference at our training centre.

© WELL HOUSE CONSULTANTS LTD., 2021: 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • EMAIL: • WEB: • SKYPE: wellho

PAGE: • PAGE BUILT: Sun Oct 11 14:50:09 2020 • BUILD SYSTEM: JelliaJamb