MCPcopy Create free account
hub / github.com/HaxeFoundation/hxcpp / lastIndexOf

Function lastIndexOf

include/Array.h:783–799  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

781 }
782
783 int lastIndexOf(ELEM_ inValue, Dynamic fromIndex = null())
784 {
785 int len = length;
786 int i = fromIndex==null() ? len-1 : fromIndex->__ToInt();
787 ELEM_ *e = (ELEM_ *)mBase;
788 if (i >= len)
789 i = len - 1;
790 else if (i < 0)
791 i += len;
792 while(i>=0)
793 {
794 if (hx::arrayElemEq(e[i],inValue))
795 return i;
796 i--;
797 }
798 return -1;
799 }
800
801 NullType shift()
802 {

Callers 1

__lastIndexOfFunction · 0.70

Calls 3

arrayElemEqFunction · 0.85
nullClass · 0.70
__ToIntMethod · 0.45

Tested by

no test coverage detected