Get the index of the field with given name.

@param name field name
@return index
487501
public int indexOf(String name) {
		int i = 0;
		for (FormItem formItem : this) {
			if (name.equals(formItem.getName())) {
				return i;
			}
			i++;
		}
		return -1;
	}
1008068
def get_index(self, field_name, catalog):
        
        index = catalog.Indexes.get(field_name, None)
        if not index and field_name == "Title":
            # Legacy
            return self.get_index("sortable_title", catalog)
        return index
690507
public int getField(int index)
	{
		assert (index >= 0 && index < version.length);

		if (index >= 0 && index < this.version.length)
		{
			return version[index];
		}
		else
		{
			throw new IllegalArgumentException("The field index requested does not exist in this Version object");
		}
	}
408988
public static List<Integer> indexes(String name, Map<String, String> data) {
        logger.debug("get indexes for {}", name);
        // matches: 'prefix[index]...'
        Pattern keyPattern = Pattern.compile("^" + Pattern.quote(name) + "\\[(\\d+)\\].*$");
        return data.keySet().stream()
                .map(key -> {
                    Matcher m = keyPattern.matcher(key);
                    return m.matches() ? Integer.parseInt(m.group(1))
                            : -1;
                }).filter(i -> i >= 0)
                .distinct()
                .sorted()
                .collect(Collectors.toList());
    }
920109
Index getIndex(String indexName) {

        Index[] indexes = indexList;
        int     i       = getIndexIndex(indexName);

        return i == -1 ? null
                       : indexes[i];
    }
875082
public int getLayerIndex(String name) {
		int idx = 0;

		for (int i = 0; i < layers.size(); i++) {
			Layer layer = (Layer) layers.get(i);

			if (layer.name.equals(name)) {
				return i;
			}
		}

		return -1;
	}
1092405
public Object get(String name) throws IOException {
        return Boolean.valueOf(isSet(name2Index(name)));
    }
71146
public static function getx($name){
        if (strpos($name, '.')) {
            list($field,$index) = explode('.', $name, 2);
            $field = self::$o->$field;
            if(isset($field[$index])) {
                return $field[$index];
            }
            return null;
        }
        return self::$o->$name;
    }
220555
public FieldValue get(String name) {
    if (schema == null) {
      throw new UnsupportedOperationException(
          "Retrieving field value by name is not supported when there is no fields schema provided");
    }
    return get(schema.getIndex(name));
  }
397124
public String findFieldName(String name, AcroFields af) {
        HashMap items = af.getFields();
        if (items.containsKey(name))
            return name;
        if (acroFieldsSom == null) {
        	if (items.isEmpty() && xfaPresent)
        		acroFieldsSom = new AcroFieldsSearch(datasetsSom.getName2Node().keySet());
        	else
        		acroFieldsSom = new AcroFieldsSearch(items.keySet());
        }
        if (acroFieldsSom.getAcroShort2LongName().containsKey(name))
            return (String)acroFieldsSom.getAcroShort2LongName().get(name);
        return acroFieldsSom.inverseSearchGlobal(Xml2Som.splitParts(name));
    }
48752
public function getIndex(string $name)
    {
        if (!isset($this->indexes[$name])) {
            Throw new IndexException(sprintf('A field named "%s" does not exist in this table', $name));
        }

        return $this->indexes[$name];
    }
198576
public static String getFieldNameWithJavaCase(final String name)
    {
       return name==null?null:Character.toLowerCase(name.charAt(0))+name.substring(1);
    }
139569
public static Field[] getFieldsIgnoreCase(Class clazz, String name) throws NoSuchFieldException {
	Field[] fields = fStorage.getFields(clazz, name);
	if (fields != null) return fields;
	throw new NoSuchFieldException("there is no field with name " + name + " in object [" + Type.getName(clazz) + "]");
    }
78989
public String get(String name) {
    List<String> valuesList = values(name);
    String value = null;
    if (valuesList != null && valuesList.size() > 0) {
      value = valuesList.get(0);
    }
    return value;
  }
781322
public function findField(string $name): Field
    {
        if ($this->hasField($name)) {
            return $this->fields[$this->fieldsNameIndex[$name]];
        }

        return null;
    }
508775
static int getIndex(CharSequence name) {
        Integer index = STATIC_INDEX_BY_NAME.get(name);
        if (index == null) {
            return -1;
        }
        return index;
    }
890598
public IndexDescriptorDef getIndexDescriptor(String name)
    {
        IndexDescriptorDef indexDef = null;

        for (Iterator it = _indexDescriptors.iterator(); it.hasNext(); )
        {
            indexDef = (IndexDescriptorDef)it.next();
            if (indexDef.getName().equals(name))
            {
                return indexDef;
            }
        }
        return null;
    }