Справка:Строковые функции

Материал из Неолурк, народный Lurkmore
Перейти к навигации Перейти к поиску
Это архивная страница с ныне недоступного сайта Lukomore.

Строковые функции (англ. String functions) — используемое на сайте, расширение для движка, добавляющее функции для работы со строками к парсеру CMS.

На сайте используется расширенная версия расширения, поэтому функций больше (новые отделены) и некоторые из них не совсем как бы строковые. Просто в лом было оформлять их как отдельное расширение (да и мало их для этого), поэтому засунули в это.

Дальше на английском ибо так легче.

Functions[править]

  • #len — returns the length of the given string
  • #pos — returns the position of a given search term within the string
  • #rpos — returns the last position of a given search term within the string
  • #sub — returns a substring from the given string
  • #pad — returns the given string extended to a given width
  • #replace — returns the given string with all occurrences of a search term replaced with a replacement term
  • #explode — splits the given string into pieces and then returns one of the pieces
  • #urlencode — converts a string into a URL-safe syntax
  • #urldecode — encode string from a URL-safe syntax into plain text

  • #basename — returns trailing name component of path
  • #rawurlencode — returns URL-encode string according to RFC 3986
  • #rawurldecode — returns decode URL-encoded according to RFC 3986 strings
  • #cleantext — returns plain text without wiki-text markup
  • #strip_tags — strip HTML and PHP tags from a string
  • #time — return current Unix timestamp
  • #genrandstr — return random string of given length
  • #var — just create variable. Yes, you long about them dreaming in MediaWiki CMS :)