a1200   NEWS   APPS   DOCS   ABOUT
a1200
----
a1200
----
Autodocs
 Libraries:
 icon.library
  AddFreeList
  BumpRevision
  ChangeToSelectedIconColor
  DeleteDiskObject
  DrawIconStateA
  DupDiskObjectA
  FindToolType
  FreeDiskObject
  FreeFreeList
  GetDefDiskObject
  GetDiskObject
  GetDiskObjectNew
  GetIconRectangleA
  GetIconTagList
  IconControlA
  LayoutIconA
  MatchToolValue
  NewDiskObject
  PutDefDiskObject
  PutDiskObject
  PutIconTagList
Include
GuruMeditation
Docs » Autodocs » icon.library » MatchToolValue

NAME

	MatchToolValue - check a tool type variable for a particular value.

SYNOPSIS

	result = MatchToolValue(typeString, value)
D0 A0 A1
BOOL MatchToolValue(STRPTR, STRPTR);

FUNCTION

	MatchToolValue is useful for parsing a tool type value for
a known value. It knows how to parse the syntax for a tool
type value (in particular, it knows that '|' separates
alternate values). Note that the parsing is case insensitive.

INPUTS

	typeString -- a ToolType value (as returned by FindToolType)
value -- you are interested if value appears in typeString

RESULT

	result -- TRUE if the value was in typeString else FALSE.

EXAMPLE

	Assume there are two type strings:
type1 = "text"
type2 = "a|b|c"
MatchToolValue( type1, "text" ) returns TRUE
MatchToolValue( type1, "TEXT" ) returns TRUE
MatchToolValue( type1, "data" ) returns FALSE
MatchToolValue( type2, "a" ) returns TRUE
MatchToolValue( type2, "b" ) returns TRUE
MatchToolValue( type2, "d" ) returns FALSE
MatchToolValue( type2, "a|b" ) returns FALSE

NOTES

	icon.library V44 skips blank spaces surrounding the typeString
options and the value string. Older icon.library versions did
not support this.

SEE ALSO

icon.library/FindToolType(), utility.library/Stricmp()

Comments

Name:
E-mail: Use this if you want a message if you get a response, will not be shown.
Comment:
Select correct short for:

The Black Lotus

HZ
DC
AYS
TBL

Comments:

$VER: d0.se 1.14 Copyright © 2011-2020 Tobias Geijersson support at d0 dot se