Return all (and only) the chars in the given string.
170699
def chars(string: any) -> str:
        """"""
        return ''.join([c if c.isalpha() else '' for c in str(string)])
761336
def get_all_lines(self):
        """"""
        output = []
        line = []
        lineno = 1
        for char in self.string:
            line.append(char)
            if char == '\n':
                output.append(SourceLine(''.join(line), lineno))
                line = []
                lineno += 1
        if line:
            output.append(SourceLine(''.join(line), lineno))

        return output
573762
def p_chars(self, p):
        """"""
        if len(p) == 1:
            p[0] = unicode()
        else:
            p[0] = p[1] + p[2]
1258311
def _skip_char_around(self, string, char='\n'):
        
        starts, ends = '', ''
        n = len(char)
        if string.startswith(char):
            starts = string[:n]
            string = string[n:]
        if string.endswith(char):
            ends = string[-n:]
            string = string[:-n]
        string = self._base_compile(string)
        if starts:
            string = starts + string
        if ends:
            string = string + ends
        return string
155667
def chars_after(chars, match):
    
    if match.end >= len(match.input_string):
        return True
    return match.input_string[match.end] in chars
1075706
private static byte[] getBytes(String string, Charset charset) {
        if (string == null) {
            return null;
        }
        return string.getBytes(charset);
    }
219348
def string_to_list(string, sep=",", filter_empty=False):
    """"""
    return [value.strip() for value in string.split(sep)
            if (not filter_empty or value)]
981994
private static function split(string $string): array
    {
        $chars = [];

        for ($i = 0; $i < strlen($string); $i++) {
            $chars[] = $string[$i];
        }

        return $chars;
    }
95534
def string_to_state(s):
    """"""
    s = lexer(s)
    attrs = {}
    while True:
        if s.cur == '>':
            attrs['start'] = True
            s.pos += 1
        elif s.cur == '@':
            attrs['accept'] = True
            s.pos += 1
        else:
            break
    x = parse_symbol(s)
    parse_end(s)
    return x, attrs
917957
def exclude_chars(text, exclusion=None):
    
    exclusion = [] if exclusion is None else exclusion
    regexp = r"|".join([select_regexp_char(x) for x in exclusion]) or r''
    return re.sub(regexp, '', text)
903601
public static String[] allLowerCase(String... strings){
		String[] tmp = new String[strings.length];
		for(int idx=0;idx<strings.length;idx++){
			if(strings[idx] != null){
				tmp[idx] = strings[idx].toLowerCase();
			}
		}
		return tmp;
	}
287164
def extract_words(string):
    ''''''
    return re.findall(r'[%s]+[%s\.]*[%s]+' % (A, A, A), string, flags=FLAGS)
11991
def _get_char_offsets(self, char_offsets):
        """"""
        if char_offsets:
            char_offsets = char_offsets
            char_offsets.append(len(self.text))
        else:
            char_offsets = np.zeros(len(self.tokens) + 1)
            for i, tok in enumerate(self.tokens):
                # Add 1 to account for the spaces between tokens
                char_offsets[i + 1] = char_offsets[i] + len(tok) + 1
            char_offsets[-1] = len(self.text)
        return np.array(char_offsets)
579271
def string_to_one_hot(string, maxchar):
    """"""
    ascii = np.array([ord(c) for c in string]).T
    return np.array(ascii[:,None] == np.arange(maxchar)[None, :], dtype=int)
899097
public static boolean in( char c, String str ) {
        return Chr.in ( c, FastStringUtils.toCharArray(str) );
    }
20735
private boolean containsOnly(String s, char c) {
        for (char c2 : s.toCharArray()) {
            if (c != c2)
                return false;
        }

        return true;
    }
403360
def filter_by(self, string):
        """"""

        self._reatach()
        if string == '':
            self.filter_remove()
            return

        self._expand_all()
        self.treeview.selection_set('')

        children = self.treeview.get_children('')
        for item in children:
            _, detached = self._detach(item)
            if detached:
                self._detached.extend(detached)
        for i, p, idx in self._detached:
            # txt = self.treeview.item(i, 'text')
            self.treeview.detach(i)
        self.filter_on = True