Indigo Rose Software
  #1  
Old 10-03-2003
Desmond's Avatar
Desmond Desmond is offline
Indigo Rose Staff Member
 
Join Date: Jul 2003
Posts: 628
Grin Comparing Two Strings

AutoPlay Media Studio 5.0 Knowledge Base

Comparing Two Strings

Document ID: IR10085
The information in this article applies to:
  • AutoPlay Media Studio 5.0 Standard Edition
  • AutoPlay Media Studio 5.0 Professional Edition

SUMMARY

This article describes how to compare two strings.

DISCUSSION

String comparisons are performed in the same manor as number comparisons. As an example, we will create two strings, and perform an action based on their contents:

  1. Create two variables containing strings:
    String1 = "I am String1";

    String2 = "I am String2";
  2. Compare the two strings:
    if String1 == String2 then

    --the two strings are equal

    else

    --the two strings are not equal

    if String1 > String2 then

    --String1 is alphabetically larger than String2

    elseif String1 < String2 then

    --String1 is alphabetically smaller than String2

    end

    end

Please note that if you want to compare the lengths of two strings, you must use the String.Length action:

if String.Length(String1) == String.Length(String2) then
--the two strings are the same length!!
end

MORE INFORMATION

For more information please see the following topics in the AutoPlay Media Studio 5.0 help file:

  • Program Reference | Actions | String | String.Length

KEYWORDS: AutoPlay Media Studio 5.0, String, Length, Compare


Last reviewed: October 3, 2003
Copyright © 2003 Indigo Rose Corporation. All rights reserved.
__________________
Setup Factory 8.0 comes with over 250 actions so you can create smaller, faster and more intelligent software installers than ever before.

WebHelp Guides: AMS | MSIFACT | SUF | TU | VP
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On



All times are GMT -6. The time now is 04:45 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
Indigo Rose Software