টেমপ্লেট:Chr
The Template:Chr extracts a specified nth character from a string, even allowing for accented letters to be included in the string.
ব্যবহার[সম্পাদনা]
- {{Chr|text|n}} = Returns the n-th character of text.
Supports a larger character set, allowing the text to have accented letters. Returns an error message for unknown characters.
উদাহরণ[সম্পাদনা]
- {{ Chr |0123456789ABCDEF|15}} → E
- {{ Chr |ÁBĆĎÉf-ABCDEF|4}} → Ď
- {{ Str len |{{ Chr |a b|1}}}} → 1
- {{ Str len |{{ Chr |a b|2}}}} → 0
- {{ Str len |{{ Chr |a b|3}}}} → 1
The last example shows extraction of letter "b" with string length as 1. The prior example extracts a blank but considers the length as 0, for there are no characters. If surrounded by 2 other characters, then the length would be totalled as 3 characters:
- {{ Str len |<{{ Chr |a b|2}}>}} → 3
- {{ Str len |X{{ Chr |a b|2}}X}} → 3
- {{ Str len |X{{ Str index any |a b|2}}X}} → 3
- X{{ Chr |a b|2}}X → X X
A string-length problem occurs when using template {{ Str index any }}.
আরও দেখুন[সম্পাদনা]
টেমপ্লেট:String templates see also
উপরোক্ত নথিটি টেমপ্লেট:Chr/নথি থেকে প্রতিলিপ্ত। (সম্পাদনা | ইতিহাস) ব্যবহারকারীগণ খেলাঘর (তৈরি করুন | আয়না) এবং পরীক্ষা পাতায় (তৈরি করুন) এই টেমপ্লেট সংক্রান্ত পরীক্ষা-নিরীক্ষা করতে পারেন। দয়া করে /নথি উপপাতায় বিষয়শ্রেণী যোগ করুন। এই টেমপ্লেটের উপপাতাসমূহ। |