Extracts a first name of full name string

@param name full name
@return first name if it could be extracted
331484
protected String extractFirstName(String name) {
    if (StringUtils.isBlank(name)) {
      return null;
    }
    
    int lastIndexOf = name.lastIndexOf(' ');
    
    if (lastIndexOf == -1)
      return null;
    else
      return name.substring(0, lastIndexOf);
  }
291930
static char getFirstCharLocName(String name) {
        final char first;
        int i = name.indexOf('}');
        if (i < 0)
            first = name.charAt(0);
        else
            first = name.charAt(i+1);
        return first;
    }
828560
def full_name(first_name, last_name, username, **extra):
    """"""
    name = " ".join(n for n in [first_name, last_name] if n)
    if not name:
        return username
    return name
1248282
def extract_first(name)
      return unless name && name.size >= 1

      @first = name.first
      name.delete_at(0)

      @first.capitalize! unless @first =~ /[a-z]/ && @first =~ /[A-Z]/
    end
702917
public static String validName(String name) {
        if (name == null || name.trim().isEmpty()) {
            return "unnamed";
        }
        StringBuilder result = new StringBuilder();
        for (char c : name.toCharArray()) {
            if (c == '_' || c == '.' || Character.isLetterOrDigit(c)) {
                result.append(c);
            }
        }
        return result.toString();
    }
1335815
public static String getPropertyName(String name) {
        if(name != null && (name.startsWith("get") || name.startsWith("set"))) {
            StringBuilder b = new StringBuilder(name);
            b.delete(0, 3);
            b.setCharAt(0, Character.toLowerCase(b.charAt(0)));
            return b.toString();
        } else {
            return name;
        }
    }
621460
public static @SlashedClassName
    String extractClassName(String originalName) {
        String name = originalName;
        if (name.charAt(0) != '[' && name.charAt(name.length() - 1) != ';') {
            return name;
        }
        while (name.charAt(0) == '[') {
            name = name.substring(1);
        }
        if (name.charAt(0) == 'L' && name.charAt(name.length() - 1) == ';') {
            name = name.substring(1, name.length() - 1);
        }
        if (name.charAt(0) == '[') {
            throw new IllegalArgumentException("Bad class name: " + originalName);
        }
        return name;
    }
120714
public static String extractName(String className) {
	if (className == null) return null;
	int index = className.lastIndexOf('.');
	if (index != -1) return className.substring(index + 1);
	return className;
    }
1137294
private String getCurrentOuRelativeName(String name) {

        if (m_request == null) {
            return CmsOrganizationalUnit.SEPARATOR + name;
        }
        String ou = CmsOrganizationalUnit.getParentFqn(name);
        if (ou.equals(m_request.getCurrentUser().getOuFqn())) {
            return CmsOrganizationalUnit.getSimpleName(name);
        }
        return CmsOrganizationalUnit.SEPARATOR + name;
    }
349462
public Set<String> getIdsPerName(final String surname, final String name) {
        if (surname == null || name == null) {
            return Collections.emptySet();
        }
        final Map<String, SortedSet<String>> namesPerSurname =
                getNamesPerSurnameMap(surname);
        if (!namesPerSurname.containsKey(name)) {
            return Collections.emptySet();
        }
        return Collections.unmodifiableSet(namesPerSurname.get(name));
    }
58859
public boolean containsName(final String name) {
        for (final T i : this) {
            if (i.getName().equals(name)) {
                return true;
            }
        }
        return false;
    }
1285524
private static Element getFirstNamedElement(Element element, String name) {
		NodeList list = element.getElementsByTagName(name);
		if (list.getLength() == 0) {
			return null;
		}

		return (Element) list.item(0);
	}
102516
public Iterable<DUser> queryByFirstName(java.lang.String firstName) {
    return queryByField(null, DUserMapper.Field.FIRSTNAME.getFieldName(), firstName);
  }
165259
public final static String clearName(String name)
    {
        boolean stripDots = false;
        boolean ascii = true;
        return clearName(name, stripDots, ascii);
    }
608402
public static String getNaturalName(String name) {
        name = getShortName(name);
        List<String> words = new ArrayList<String>();
        int i = 0;
        char[] chars = name.toCharArray();
        for (int j = 0; j < chars.length; j++) {
            char c = chars[j];
            String w;
            if (i >= words.size()) {
                w = "";
                words.add(i, w);
            }
            else {
                w = words.get(i);
            }

            if (Character.isLowerCase(c) || Character.isDigit(c)) {
                if (Character.isLowerCase(c) && w.length() == 0) {
                    c = Character.toUpperCase(c);
                }
                else if (w.length() > 1 && Character.isUpperCase(w.charAt(w.length() - 1))) {
                    w = "";
                    words.add(++i,w);
                }

                words.set(i, w + c);
            }
            else if (Character.isUpperCase(c)) {
                if ((i == 0 && w.length() == 0) || (Character.isUpperCase(w.charAt(w.length() - 1)) && Character.isUpperCase(chars[j-1]))) {
                    words.set(i, w + c);
                }
                else {
                    words.add(++i, String.valueOf(c));
                }
            }
        }

        StringBuilder buf = new StringBuilder();
        for (Iterator<String> j = words.iterator(); j.hasNext();) {
            String word = j.next();
            buf.append(word);
            if (j.hasNext()) {
                buf.append(' ');
            }
        }
        return buf.toString();
    }
198576
public static String getFieldNameWithJavaCase(final String name)
    {
       return name==null?null:Character.toLowerCase(name.charAt(0))+name.substring(1);
    }
615182
public String getName(String name) {
        String value;
        if ((value = attributeAliases.getProperty(name)) != null) {
            return value;
        }
        return name;
    }