Convert a field value to a string.

        Returns the state name.
773921
def value_to_string(self, obj):
        
        statefield = self.to_python(self.value_from_object(obj))
        return statefield.state.name
776657
public String getString( int index ) throws OdaException
	{
		Object value = getFieldValue(index);
		if (value!=null){
			return value.toString();
		}
		return null;
	}
1353793
public static function getBindFieldName(string $field): string
    {
        $field = str_replace('.', '_', $field);
        $field = str_replace('(', '', $field);
        $field = str_replace(')', '', $field);
	    $field = str_replace('*', '', $field);

	    return strtolower($field) . static::getKeyIndex();
    }
1269642
def _coerce_state_from_string(value: Union[int, str]) -> str:
        """"""
        try:
            return STATE_MAP[int(value)]
        except KeyError:
            _LOGGER.error('Unknown state: %s', value)
            return STATE_UNKNOWN
1176850
public static String getFieldName(Field field) {
        String name = field.getName();
        String formattedName = Formatter.toCamelCase(name);
        if (isReservedKeyword(formattedName)) {
            return formattedName + '_';
        }
        return formattedName;
    }
911592
private static String getTypeName(FieldElement field) {
        DataType type = field.type();
        return type.toString();
    }
1215132
public static String getJsonFieldName(Field field) {
        String name = field.getName();
        return Formatter.toCamelCase(name);
    }
551959
private static String readString(String fieldName, ByteBuf in) {
        int length = in.bytesBefore(MAX_FIELD_LENGTH + 1, (byte) 0);
        if (length < 0) {
            throw new DecoderException("field '" + fieldName + "' longer than " + MAX_FIELD_LENGTH + " chars");
        }

        String value = in.readSlice(length).toString(CharsetUtil.US_ASCII);
        in.skipBytes(1); // Skip the NUL.

        return value;
    }
448736
public static String getRepeatedEnumConverterName(Field field) {
        if (field.isRepeated()) {
            return "__" + Formatter.toCamelCase(field.getName()) + "Converter";
        }
        throw new IllegalArgumentException(field.toString());
    }
61698
private String getDataFieldValue(String dataHeader, String fieldName) {
		String value = null;
		String token = StrUtil.format("{}=\"", fieldName);
		int pos = dataHeader.indexOf(token);
		if (pos > 0) {
			int start = pos + token.length();
			int end = dataHeader.indexOf('"', start);
			if ((start > 0) && (end > 0)) {
				value = dataHeader.substring(start, end);
			}
		}
		return value;
	}
1205668
def get_field_value(self, field, context):
        
        name = field.getName()
        value = context.getField(name).get(context)
        logger.info("get_field_value: context={} field={} value={}".format(
            context, name, value))
        return value
844155
public static String getFieldName(
      Descriptors.FieldDescriptor field, boolean capitializeFirstLetter) {
    String fieldName = field.getName();
    if (SPECIAL_CASES.containsKey(fieldName)) {
      String output = SPECIAL_CASES.get(fieldName);
      if (capitializeFirstLetter) {
        return output;
      } else {
        return ((char) (output.charAt(0) + ('a' - 'A'))) + output.substring(1);
      }
    }
    return underscoresToCamelCase(fieldName, capitializeFirstLetter);
  }
476898
protected String fieldsToString() {
        return "name='" + name
                + "', listenerConfigs=" + listenerConfigs
                + ", backupCount=" + backupCount
                + ", asyncBackupCount=" + asyncBackupCount
                + ", maxSize=" + maxSize
                + ", statisticsEnabled=" + statisticsEnabled
                + ", quorumName='" + quorumName + "'"
                + ", mergePolicyConfig='" + mergePolicyConfig + "'";
    }
1101616
private static String toColumnName(String fieldName) {
        int lastDot = fieldName.indexOf('.');
        if (lastDot > -1) {
            return fieldName.substring(lastDot + 1);
        } else {
            return fieldName;
        }
    }
749314
def value_to_string(self, obj):
        """"""
        value = getattr(obj, self.attname)
        return self.get_prep_value(value)
457219
public static String toCamelName(String value) {
        String[] partOfNames = value.split("_");

        StringBuilder sb = new StringBuilder(partOfNames[0]);
        for (int i = 1; i < partOfNames.length; i++) {
            sb.append(partOfNames[i].substring(0, 1).toUpperCase());
            sb.append(partOfNames[i].substring(1));
        }
        return sb.toString();
    }
1227709
private static Fields toFieldEnum(Field field) {
        Class<?> clazz = field.getType();
        String name = clazz.getSimpleName().toLowerCase();

        if (name.equals("int") || name.equals("integer")) {
            return Fields.INT;
        } else if (name.equals("long")) {
            return Fields.LONG;
        } else if (name.equals("float")) {
            return Fields.FLOAT;
        } else if (name.equals("double")) {
            return Fields.DOUBLE;
        } else if (CharSequence.class.isAssignableFrom(clazz)) {
            return Fields.STRING;
        } else if (name.equals("boolean")) {
            return Fields.BOOLEAN;
        } else if (clazz.isAssignableFrom(List.class)) {
            ParameterizedType listType = (ParameterizedType) field.getGenericType();
            Class<?> listClass = (Class<?>) listType.getActualTypeArguments()[0];

            if (listClass.toString().equals("class java.lang.String")) {
                return Fields.LIST;
            }
        }

        throw new RuntimeException("Field not found!");
    }