IndexOf Command

From GeoGebra Manual
Jump to: navigation, search


IndexOf[ <Object>, <List> ]
Returns position of first occurrence of Object in List.
Examples: IndexOf[5, {1, 3, 5, 2, 5, 4}] returns 3.
Note: When the object is not found, result is undefined.


IndexOf[ <Object>, <List>, <Start Index> ]
Same as above, but the search starts at given index.
Examples:
  • IndexOf[5, {1, 3, 5, 2, 5, 4}, 3] returns 3.
  • IndexOf[5, {1, 3, 5, 2, 5, 4}, 4] returns 5.
  • IndexOf[5, {1, 3, 5, 2, 5, 4}, 6] returns undefined.


IndexOf[ <Text>, <Text> ]
Specifies the position at which the short text appears for the first time in the whole text.
Example: IndexOf["Ge", "GeoGebra"] returns 1.


IndexOf[ <Text>, <Text>, <Start Index> ]
Same as above, but the search starts at given index.
Example: IndexOf["Ge", "GeoGebra",2] returns 4.
  • GeoGebra
  • Help
  • Partners
  • Contact us
    • Feedback & Questions
    • This email address is being protected from spambots. You need JavaScript enabled to view it.
    • +43 677 6137 2693
© 2017 International GeoGebra Institute