Click to Rate and Give Feedback
MSDN
MSDN Library
Visual FoxPro
Reference
Language Reference
Functions
 AT_C( ) Function

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2005/.NET Framework 2.0

Other versions are also available for the following:
Visual FoxPro 9.0 SP2
AT_C( ) Function

Returns the beginning numeric position of the first occurrence of a character expression or memo field within another character expression or memo field, counting from the leftmost character.

AT_C(cSearchExpression, cExpressionSearched [, nOccurrence])

Parameters

cSearchExpression

Specifies the character expression that AT_C( ) searches for in cExpressionSearched.

cExpressionSearched

Specifies the character expression cSearchExpression searches for.

Both cSearchExpression and cExpressionSearched can be memo fields of any size.

nOccurrence

Specifies which occurrence (first, second, third, and so on) of cSearchExpression is searched for in cExpressionSearched. By default, AT_C( ) searches for the first occurrence of cSearchExpression (nOccurrence = 1). Including nOccurrence lets you search for additional occurrences of cSearchExpression in cExpressionSearched. AT_C( ) returns 0 if nOccurrence is greater than the number of times cSearchExpression occurs in cExpressionSearched.

Numeric

AT_C( ) searches the second character expression for the first occurrence of the first character expression. It then returns an integer indicating the position of the first character in the character expression found. If the character expression isn't found, AT_C( ) returns 0.

AT_C( ) is designed for expressions containing double-byte characters. If the expression contains only single-byte characters, AT_C( ) is equivalent to AT( ).

The search performed by AT_C( ) is case-sensitive. To perform a search that isn't case-sensitive, use ATCC( ).

This function is useful for manipulating double-byte character sets for languages such as Hiragana and Katakana.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker