Šablon:Niz šabloni
Sa Wikipedije, slobodne enciklopedije
| Trenutno se vrše izmjene na članku. Kao znak dobre volje, suzdržite se od mijenjanja članka dok je prikazano obavještenje kako bi izbjegli koliziju s trenutnim izmjenama. |
| Ovaj članak nije preveden ili je djelimično preveden. Ako smatrate da ste sposobni da ga prevedete, kliknite na link uredi i prevedite ga vodeći računa o enciklopedijskom stilu pisanja i pravopisu bosanskog jezika. |
[uredi] Niz šabloni
Dotjeravanje nizova
| Šablon | Engleska verzija | Opis |
|---|---|---|
| {{Skrati}} | Trunc | To trim down to a specified number of characters. |
| {{Niz lijevo}} | Str left | To trim down to a specified number of characters, or duplicate the string to a specified number. |
| {{Niz podreži}} | Str crop | To crop a specified number of characters off the end. |
| {{Niz podreži/glavu i rep}} | Chop head and tail | To crop a specified number of characters off the beginning and end. |
| {{Niz dotjeraj}} | Trim | To trim any leading or trailing whitespace. |
| {{Prva riječ}} | First word | To trim down to the first space. |
| {{Bez prve riječi}} | Remove first word | To remove anything before the first space (no accented characters in the string). |
| {{Bez prve riječi/sve}} | Remove first word/any | To remove anything before the first space (wider range of characters in the string). |
| {{Niz slovo/dotjeraj}} | Str letter/trim | To trim down to the beginning letters. |
| {{Niz broj/dotjeraj}} | Str number/trim | To trim down to the beginning numbers. |
| {{Naslov/bez zagrada}} | Title without disambig | To trim off any parenthesis text at the end of a string. |
| {{Naslov/zagrada}} | Title disambig text | Returns text in parenthesis at the end of a string. |
| {{Niz desno}} | Str right | To trim the first specified number of characters. |
| {{Niz desnos}} | Str rightc | To trim the first specified number of characters, returns a parameter if the string is empty. |
| {{Niz krajnji desni}} | Str rightmost | To trim down to the last specified number of characters. |
| {{Niz pod}} | Str sub | To trim down to a specified number, starting at a given number from the left, less than 50. |
| {{Niz pod/sve}} | Substr any | To trim down to a specified number, starting at a given number from the left, less than 50, can extract accented letters. |
| {{Niz pod/dugo}} | Str sub long | To trim down to a specified number, starting at a given number from the left, less than 100. |
Ubacivanje nizova
| Šablon | Engleska verzija | Opis |
|---|---|---|
| {{Niz ubaci}} | Strloc insert | Inserts a string at character location strloc, or appends if strloc<=0. |
| {{Niz predmetak}} | Strloc prefix | Extracts string prefix up to location strloc, or whole string if strloc<=0. |
| {{Niz zamjeni}} | Str rep | Returns the string, replacing the first occurrence of a specified string, with another string. Requires a match. |
| {{Str zamjeniu}} | Str repc | Returns the string, replacing the first occurrence of a specified string, with another string, if there is one. |
Analiza nizova
| Šablon | Engleska verzija | Opis |
|---|---|---|
| {{Niz završavasa}} | Str endswith | To check if a string ends with a given string. |
| {{Niz traži}} | Str find | Returns the numerical location of a given string in a string, up to 50 characters. |
| {{Niz traži/dugo}} | Str find long | Returns the numerical location of a given string in a string, up to 80 characters. |
| {{Niz traži/kratko}} | Strfind short | Searches for a short string in a longer (up to 99 char) string. Performs faster than {{str find}} |
| {{Niz traži/0}} | Str find0 | Very fast zero-based substring search with string support up to 90 characters. |
| {{Niz traži/podniz}} | Str sub find | Searches a substring in a string at the given offset. |
| {{Niz indeks}} | Str index | Returns a given character from a string, but not accented letters. |
| {{Niz indeks/sve}} | Str index any | Returns a given character from a string, but not a space. |
| {{Niz znak}} | Chr | Returns a given character from a string, including a space. |
| {{Niz dužina}} | Str len | Returns a string's length. Can count up to 500 characters. |
| {{Niz dužina/brzo}} | Strlen quick | Gets string length quickly (better performance), up to 70 long. |
| {{Niz dužina/kratko}} | Strlen short | Gets length of short strings (1-50), using only 2 expansion levels. |
| {{Niz slovo}} | Str letter | Returns the number of letters that begin a string. |
| {{Niz broj}} | Str number | Returns the number of numbers that begin a string. |
Dužina niza i uspoređujući šabloni
| Šablon | Engleska verzija | Opis |
|---|---|---|
| {{Niz ≥ dužina}} | Str ≥ len | Provjera da li je niz "duži ili jednake dužine" ili "kraći" od date dužine. |
| {{Niz ≤ dužina}} | Str ≤ len | Provjera da li je niz "duži ili jednake dužine" ili "duži" od date dužine. |
| {{Niz ≠ dužina}} | Str ≠ len | Provjera da li je niz "ne jednak" ili "jednak" od date dužine. |
| {{Niz ≤ ≥ dužina}} | Str ≤ ≥ len | Provjera da li je niz "kraći", "jednak" ili "duži" od date dužine. |
[uredi] Tehnička dokumentacija
- (en) mw:Help:Magic words – O upotrebi
{{padleft:|}}. - (en) mw:Help:Extension:ParserFunctions – O upotrebi
{{#titleparts:|}}, {{#expr:|}}, {{#ifeq:|}},itd.
[uredi] Budući zahtijevi
- (en) bugzilla:6455 - Staviti
$wgPFEnableStringFunctions = truena WMF wikijima. - (en) bugzilla:26092 - Uključiti ili instalirati string parsing wikimarkup funkcionalitet na WMF wikijima.