Show Changes Show Changes
Edit Edit
Print Print
Recent Changes Recent Changes
Subscriptions Subscriptions
Lost and Found Lost and Found
Find References Find References
Rename Rename
Administration Page Administration Page
Search

History

9/24/2008 5:58:49 PM
FLWCOM-jwdavidson
5/14/2008 6:17:41 AM
-66.161.197.130
5/13/2008 7:44:33 PM
-71.65.110.116
5/11/2007 7:47:31 AM
-87.123.126.112
12/21/2005 4:48:10 PM
-131.107.0.75
List all versions List all versions

RSS feed for the FlexWiki namespace

Related Topics

String Demo
.

What information is available about a String?

A String type has the following members:

Integer AsInteger
Answer the string converted to an integer
Object Contains(Object obj)
Determine whether this string contains another string
Object Equals(Object obj)
Determine whether this object is equal to another object
Object EqualsCaseInsensitive(Object obj)
Determine whether this string is equal to another string (ignoring case)
Integer IndexOf(Object obj)
Answer an integer giving the first index of the provided string, or -1 if the string does not contain the provided string.
Integer Length
Answer the number of characters in this string
String Repeat(Integer count)
Answer a new string than is the concatenation of the given number of copies of this string
String Reverse
Answer a copy of this string with the characters reversed
String Substring(Integer index, Integer length {optional})
Answer a substring of this string starting at the given character and possibly limited to the given number of characters

Questions

Question

Examples

Compare two strings

 "hello".Equals("hello")
true
 "Hello".EqualsCaseInsensitive("HELLO")
true

Check to see if a string contains another string

 "Hello Dolly".Contains("Dolly")
true
 "Hello Dolly".Contains("Panda")
false

Repeat

 "x".Repeat(5)
xxxxxxxxxx

Length

 "".Length
0
 "!!!".Repeat(1000).Length
3000

Reverse

 "Reverse".Reverse
esreveR

Substring

 "FlexWiki".Substring(0,4)
Flex
 "FlexWiki".Substring(2,4)
exWi
 "FlexWiki".Substring(4)
Wiki

Empty

 empty.Length
0

How to concatenate / append strings

Concatenate strings by creating an array of strings and converting the array to a string.

 ["String 1", "String 2"].ToOneString
String 1String 2

The Newline constant

Newline = ' '

Newline.Length = '2'

Newline.Substring(1,1) = ' '

Newline.Substring(0,1) = ' '

Max Length String

 String.MaxLengthString("ABCDEFGHIJKLMNOPQRSTUVWXYZ", 12)
ABCDEFGHIJKL
 String.MaxLengthString("ABCDEFGHIJKLMNOPQRSTUVWXYZ", 12, "xxx")
ABCDEFGHIxxx

Not logged in. Log in

Welcome to the home of FlexWiki, a collaboration tool, based on WikiWiki, implemented using Microsoft .NET technologies

This is FlexWiki, an open source wiki engine.

This site supports the new NoFollow anti-spam initiative.
Change Style

Recent Topics