Set the character to press for triggering the action

@api
@param string $charPressed Pressed character
@return static
496863
public function setCharPressed($charPressed)
    {
        $this->keyName     = null;
        $this->keyCode     = null;
        $this->charPressed = (string)$charPressed;
        return $this;
    }
353816
public function char($char = null)
    {
        $pos = $this->pos;
        if ( ! is_null($char)) {
            $pos = $char;
        }

        if ( ! isset($this->content[$pos])) {
            return '';
        }

        return $this->content[$pos];
    }
473113
public function set(string $str): self
    {
        $this->str = $this->inputConv($str);

        return $this;
    }
930420
public static function charNotInAlphabet(string $char) : self
    {
        $ord = \ord($char);

        if ($ord < 32 || $ord > 126) {
            $char = \strtoupper(\dechex($ord));

            if ($ord < 10) {
                $char = '0' . $char;
            }
        } else {
            $char = '"' . $char . '"';
        }

        return new self(sprintf('Char %s is not a valid character in the given alphabet.', $char));
    }
793503
public function setAction(string $action)
    {
        $string = new CamelCase($action);
        $this->action = $string->camelize();
    }
940086
@Override
    public void keyPressed(int keyCode, char keyChar)
    {
        // Validate message
        if (keyCode == keyValidate)
        {
            if (message.length() > 0)
            {
                sendValidatedMessage();
            }
        }
        else if (keyCode == keyBackSpace)
        {
            if (message.length() > 0)
            {
                message.deleteCharAt(message.length() - 1);
            }
        }
        else if (Character.isDefined(keyChar) && canAddChar(keyChar))
        {
            message.append(keyChar);
        }
        display = message.toString();
    }
736381
public static function copyValueOf($charList): self
    {
        Assert::typeOf(['string', 'array', __CLASS__], $charList);

        // Convert to native string before creating a new string object
        $string = '';

        if (\is_array($charList)) {
            foreach ($charList as $value) {
                $string .= static::valueOf($value);
            }
        } else {
            $string = (string) $charList;
        }

        return new static($string);
    }
681288
public function setValid($charset, $valid = true)
    {
        $charset = Horde_String::upper($charset);
        $valid = (bool)$valid;

        if (!isset($this->_charsets[$charset]) ||
            ($this->_charsets[$charset] !== $valid)) {
            $this->_charsets[$charset] = $valid;
            $this->notify();
        }
    }
721074
public function addSpecialCaseChar($char)
    {
        if (!in_array($char, $this->specialCaseChars)) {
            $this->specialCaseChars[] = $char;
        }

        return $this;
    }
1176574
public function removeSpecialCaseChar($char)
    {
        $key = array_search($char, $this->specialCaseChars);
        if ($key !== false) {
            unset($this->specialCaseChars[$key]);
        }

        return $this;
    }
213092
public function setCharList($charList)
    {
        if (! strlen($charList)) {
            $charList = null;
        }

        $this->options['charlist'] = $charList;

        return $this;
    }
897174
public static Action charset(final String charset) {
        return new Action(r -> {
            r.setCharacterEncoding(charset);
            return r;
        });
    }
48467
protected function pushToCharacters($property)
    {
        if (! empty($this->charSet[$property])) {
            $this->characters = array_merge($this->characters, str_split($this->charSet[$property]));
        }
    }
266136
public function setContentType($type, $charset=''){
        if(headers_sent()) return;
        if(empty($charset))  $charset = C('DEFAULT_CHARSET');
        $type = strtolower($type);
        if(isset($this->allowOutputType[$type])) //过滤content_type
            header('Content-Type: '.$this->allowOutputType[$type].'; charset='.$charset);
    }
110039
public function setInputCharset($charset)
    {
        $flag = true;
        
        $charset  = strtolower($charset);
        $charsets = array('utf-8', 'windows-1256', 'cp1256', 'iso-8859-6');
        
        if (in_array($charset, $charsets)) {
            if ($charset == 'windows-1256') {
                $charset = 'cp1256';
            }
            $this->_inputCharset = $charset;
        } else {
            $flag = false;
        }
        
        return $flag;
    }
698542
public function setCharset($charset)
    {
        $this->setHeaderParameter('Content-Type', 'charset', $charset);
        if ($charset !== $this->userCharset) {
            $this->clearCache();
        }
        $this->userCharset = $charset;
        parent::charsetChanged($charset);

        return $this;
    }
189255
public function setCharacters(Array $characters)
	{
		if (count($characters) !== count(array_filter($characters, 'is_string'))) {
			throw new \InvalidArgumentException(
				__METHOD__."() expects parameter one, characters, to be an array of "
					. "strings"
			);	
		}
		
		$this->characters = $characters;
		
		return $this;
	}