As pointed out there are no midstr, leftstr functions in the actual AnsiString class. You would just use SubString which allows you to do left, mid and also right type functionality.

So your example would go like this,

AnsiString branchnum;
AnsiString SomeVar = "Programmer";

branchnum = SomeVar.SubString(1,7);

In the SubString call the first number is the index, which starts at 1 and the second is the length or the desired section.

I would suggest taking a good read over the help for AnsiString as it has a lot of functionality built in which can save re-inventing the wheel.

So for the caps version,

branchnum = SomeVar.UpperCase();

The reason that UpperCase(<str here>) works is because it is also a part of the string handing functions, so look under help for 'string handling routines' and you will get a full list of additional functions for working with AnsiStrings.

Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…

How to install Selenium IDE and loops for quick automated testing.
Get Selenium IDE from http://seleniumhq.org (http://seleniumhq.org)
Go to that link and select download selenium in the right hand columnThat will then direct you to their downlo…