SalomIsm String formatida ism berilgan, masalan “Otabek”,ismdan foydlanib “Salom Otabek!” ko`rinishidagi qiymat qaytarilsin


Agar berilgan satrning birinchi va oxirgi ikkita belgisi o`zaro teng bo`lsa true qiymat qaytarilsin, misol uchun “edited”


Download 110 Kb.
bet6/8
Sana08.01.2022
Hajmi110 Kb.
#234790
1   2   3   4   5   6   7   8
Bog'liq
CodingBat String 1

Agar berilgan satrning birinchi va oxirgi ikkita belgisi o`zaro teng bo`lsa true qiymat qaytarilsin, misol uchun “edited”.

frontAgain("edited") → true


frontAgain("edit") → false
frontAgain("ed") → true

String-1 > minCat 
prev  |  next  |  chance

Given two strings, append them together (known as "concatenation") and return the result. However, if the strings are different lengths, omit chars from the longer string so it is the same length as the shorter string. So "Hello" and "Hi" yield "loHi". The strings may be any length.

Ikkita satr berilgan bo`lib, ularni ketma-ket qo`shib yozishdan yangi satr hosil qiling. Agar satr uzunliklari turlicha bo`lsa uzunini boshidan boshlab qisqasiga tenglashguncha boshidagi belgilarni olib tashlab keyin qo`shing. Masalan: “Hello” va “Hi” satrlaridan “loHi” hosil bo`ladi

minCat("Hello", "Hi") → "loHi"


minCat("Hello", "java") → "ellojava"
minCat("java", "Hello") → "javaello"

String-1 > extraFront 
prev  |  next  |  chance

Given a string, return a new string made of 3 copies of the first 2 chars of the original string. The string may be any length. If there are fewer than 2 chars, use whatever is there.


Download 110 Kb.

Do'stlaringiz bilan baham:
1   2   3   4   5   6   7   8




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling