[Overview][Constants][Types][Procedures and functions] Reference for unit 'strutils' (#rtl)

IsWordPresent

Check for the presence of a word in a string.

Declaration

Source position: strutils.pp line 156

function IsWordPresent(

  const W: String;

  const S: String;

  const WordDelims: TSysCharSet

):Boolean;

Arguments

W

  

Word to search for

S

  

String to search

WordDelims

  

Characters to use as word separators

Function result

Trueif the word is present, Falseif not.

Description

IsWordPresentchecks for the presence of the word Win the string S. Words are delimited by the characters found in WordDelims. The function returns Trueif a match is found, Falseotherwise. The search is performed case sensitive.

This function is equivalent to the SearchBuffunction with the soWholeWordsoption specified.

Errors

None.

See also

SearchBuf

  

Search a buffer for a certain string.