Advanced String Functions for VB Portland OR

A look at a few advanced string functions for VB.

Local Companies

Cascade Custom Software
503-922-0135
1000 SW Broadway
Portland, OR
Advantyx Software LLC
503-246-9299
6501 SW Macadam Ave
Portland, OR
Aravo Solutions
503-224-4049
2627 NW Nicolai St
Portland, OR
Axis Clinical Software Inc
503-292-3022
6443 SW Beaverton Hillsdale Hwy
Portland, OR
ApogeeInvent
403.407.9915
9999 SW Wilshire St. Ste. 100
Portland, OR
Cendix
503.789.2676
501 4th Street, Suite 741
Lake Oswego, OR
Artisan Software Tools Inc
503-245-6200
10220 SW Greenburg Rd
Portland, OR
Vision33
971-255-0162
The Lincoln Center, 10260 SW Greenburg Road, 4th Floor
Portland, OR
Paradigma Software
(503) 574-2776
6107 SW Murray Blvd #151
Beaverton, OR
ClearStar.net
360-892-0687
915 Broadway
Vancouver, WA

provided by: 
Originally published at Internet.com


Last week, we looked at the basic string functions, and some of their applications. This week, we will look at the more advanced string functions, and put them into use.

LTrim$, RTrim$, Trim$

These are the first functions that we will look at this week. They only just fall into the advanced category. They are used to remove preceding and trailing spaces from strings. For example: mystring = " Hello! " LTrim$(mystring) contains "Hello! " Rtrim$(mystring) contains " Hello!" Trim$(mystring) contains "Hello!" It is equal to LTrim$(RTrim$(mystring))

This function is particularly useful for API functions, which often return strings with spaces preceding and trailing the string.

Syntax: LTrim(string) RTrim(string) Trim(string)

Asc

This function returns the ASCII character code for a character. This is particularly useful for something that encodes passwords: you could take 1 from the character code, just as a simple code. Asc("A") returns 65 Asc("A happy elephant") returns 65 (it takes the first character only)

Syntax:

Asc(string)

Format$

To explain this function in detail would need a lot more room than this quick round up of advanced string functions allows. So, I will just touch on some of its functionality. There is lots of information in the help file about it, so try looking there for more in-depth information.

Format(123.4, "#####.##") returns "123.4"
Format(123.4, "00000.00") returns "00123.40"
Format(123456.789, "###,###.#") returns "123,456.7"
Format(#07:14:23#, "hh:mm AM/PM") returns "07:18 AM"

Author: John Percival

Read article at Internet.com site

Featured Local Company

Cascade Custom Software

503-922-0135
1000 SW Broadway
Portland, OR

Related Local Events
WOOD TECHNOLOGY CLINIC & SHOW 2010
Dates: 3/9/2010 - 3/11/2010
Location: Oregon Convention Center
Portland, OR
View Details

Party in the Pinot
Dates: 7/25/2009 - 7/25/2009
Location: Oswego Hills Winery
West Linn, OR
View Details