Applies {@link #unicodeFriendly(String)} to the contents of a list.
495843
public static ImmutableList<UnicodeFriendlyString> unicodeFriendlyList(Iterable<String> strings) {
    final ImmutableList.Builder<UnicodeFriendlyString> ret = ImmutableList.builder();

    for (final String s : strings) {
      ret.add(unicodeFriendly(s));
    }

    return ret.build();
  }
1038344
def ensure_unicoded_and_unique(args_list, application):
    
    unicoded_args = []
    for argument in args_list:
        argument = (six.u(argument)
                    if not isinstance(argument, six.text_type) else argument)
        if argument not in unicoded_args or argument == application:
            unicoded_args.append(argument)
    return unicoded_args
129368
public String serializeFilterList(List<Filter> list) {
        ObjectMapper om = getObjectMapper();
        try {
            return om.writeValueAsString(new ListWrappers.FilterList(list));
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
448294
def unicode_safe(text, encoding=UrlEncoding, errors='ignore'):
    """"""
    try:
        text_type = unicode
    except NameError:
        text_type = str
    if isinstance(text, text_type):
        return text
    return text.decode(encoding, errors)
702055
private static String formatListToString(final List<String> list)
	{
		int lineLength = 0;
		final StringBuffer sb = new StringBuffer();
		for (final String str : list)
		{
			final int length = str.length();
			lineLength = length + lineLength;
			sb.append(str);
			sb.append(", ");
			if (100 < lineLength)
			{
				sb.append("\n");
				lineLength = 0;
			}
		}
		return sb.toString().trim();
	}
1076366
def _fix_unicode_list(self, columns):
        '''
        
        '''
        if type(columns) in [list, tuple]:
            for i in range(0, len(columns)):
                try:
                    columns[i] = self._fix_unicode(columns[i])
                except AttributeError:
                    pass
        return columns
444136
def is_unicode(string):
    """"""
    str_type = str(type(string))

    if str_type.find('str') > 0 or str_type.find('unicode') > 0:
        return True

    return False
952328
public static <IN> PaddedList<IN> valueOf(List<IN> list, IN padding) {
    return new PaddedList<IN>(list, padding);
  }
540791
public static ImmutableSet<Symbol> setFrom(final Iterable<String> strings) {
    checkNotNull(strings);

    return FluentIterable.from(strings)
        .transform(Symbolize)
        .toSet();
  }
77794
protected Set<String> normalizeWhitelist(Set<String> whitelist) {
    Set<String> result = new HashSet<>();
    for (String line : whitelist) {
      String trimmed = line.trim();
      if (trimmed.isEmpty() || trimmed.charAt(0) == '#') {
        // strip out empty lines and comments.
        continue;
      }

      // Strip line number for matching.
      result.add(LINE_NUMBER.matcher(trimmed).replaceFirst(":"));
    }
    return ImmutableSet.copyOf(result);
  }
1313151
static List<Token> tokenize(final String value) {
		final List<Token> tokens = new ArrayList<>();

		char pc = '\0';
		int pos = 0;
		final StringBuilder token = new StringBuilder();
		for (int i = 0; i < value.length(); ++i) {
			final char c = value.charAt(i);

			if (isTokenSeparator(c) && pc != ESCAPE_CHAR) {
				tokens.add(new Token(unescape(token.toString()), pos));
				tokens.add(new Token(Character.toString(c), i));
				token.setLength(0);
				pos = i;
			} else {
				token.append(c);
			}

			pc = c;
		}

		if (token.length() > 0) {
			tokens.add(new Token(unescape(token.toString()), pos));
		}

		return tokens;
	}
190693
private static <L extends List<String>> L trimStringList(L strings)
    {
        for (ListIterator<String> listIt = strings.listIterator(); listIt.hasNext(); )
        {
            String string = listIt.next().trim();
            listIt.set(string);
        }
        return strings;
    }
1020586
@NonNull
  public static <T> List<T> immutableCopyOf(@Nullable List<T> list) {
    if (isNullOrEmpty(list)) {
      return Collections.emptyList();
    }
    return Collections.unmodifiableList(new ArrayList<>(list));
  }
492568
def safe_unicode(string):
    ''''''
    if not isinstance(string, basestring):
        string = unicode(string)
    if isinstance(string, unicode):
        string = string.encode('utf8')
    return string
1103102
public void setExcludeList(List<String> ignoredRegexs) {
		if (ignoredRegexs == null || ignoredRegexs.isEmpty()) {
			excludeList = Collections.emptyList();
			return;
		}

		this.excludeList = ignoredRegexs;
	}
42645
def force_unicode(value):
    
    if not isinstance(value, (str, unicode)):
        value = unicode(value)
    if isinstance(value, str):
        value = value.decode('utf-8')
    return value
1275284
public static boolean containsAny(final String str, final String[] list, final boolean ignoreCase) {
        
        if(str == null) {
            return false;
        }
        
        if(list == null || list.length == 0) {
            return false;
        }
        
        for(String item : list) {
            if(ignoreCase) {
                if(containsIgnoreCase(str, item)) {
                    return true;
                }
            } else {
                if(str.indexOf(item) >= 0) {
                    return true;
                }
                
            }
        }
        
        return false;
        
    }