|
|
(3 مراجعات متوسطة بواسطة نفس المستخدم غير معروضة) |
سطر 1: |
سطر 1: |
− | <noinclude>{{DISPLAYTITLE: التابع text.isWhitespace() في لغة Kotlin}}</noinclude>
| + | #REDIRECT [[Kotlin/text/isWhitespace]] |
− | تعيد الدالة <code>isWhitespace()</code> القيمة <code>true</code> في حال كان [[Kotlin/Char/index|الحرف]] (character) الذي استٌدعيت عبره مسافة بيضاء (whitespace).
| |
− | == البنية العامة ==
| |
− | <syntaxhighlight lang="kotlin">
| |
− | actual fun Char.isWhitespace(): Boolean
| |
− | | |
− | </syntaxhighlight>
| |
− | == القيم المعادة ==
| |
− | قيمة منطقية.
| |
− | | |
− | == أمثلة ==
| |
− | | |
− | === استخدام الدالة <code>isWhitespace()</code> مع الحروف ===
| |
− | تُعرّف الشيفرة الآتية [[Kotlin/Char/index|حرفين]] <code>x</code> و <code>y</code> ثم تستدعي الدالة <code>isWhitespace()</code> عبرهما، ثم تطبع الناتج:<syntaxhighlight lang="kotlin">
| |
− | fun main(args: Array<String>) {
| |
− | val x = '_'
| |
− | val y = ' '
| |
− |
| |
− | print(x.isWhitespace()) // false
| |
− | print(y.isWhitespace()) // true
| |
− | }
| |
− | </syntaxhighlight>
| |
− | == انظر أيضًا ==
| |
− | * <code>[[Kotlin/text/isLowerCase|isLowerCase()]]</code>: تعيد القيمة <code>true</code> في حال كان الحرف (character) الذي استٌدعيت عبره حرفًا صغيرًا (lower case).
| |
− | * <code>[[Kotlin/text/isIdentifierIgnorable|isIdentifierIgnorable()]]</code>: تعيد القيمة <code>true</code> في حال كان الحرف الذي استٌدعيت عبره يجب أن يُهمل في مُعرِّفات جافا (Java identifier) أو اليونيكود.
| |
− | * <code>[[Kotlin/text/isHighSurrogate|isHighSurrogate()]]</code>: تعيد القيمة <code>true</code> في حال كان الحرف الذي استٌدعيت عبره بديلًا علويًا لكود اليونيكود (Unicode high-surrogate code unit).
| |
− | * <code>[[Kotlin/text/isDefined|isDefined()]]</code>: تعيد القيمة <code>true</code> في حال كان الحرف (Unicode code point) الذي استٌدعيت عبره مُعرّفًا في اليونيكود (Unicode).
| |
− | | |
− | == مصادر ==
| |
− | * [https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/is-whitespace.html صفحة الدالة isWhitespace() في التوثيق الرسميّ للمكتبة القياسيّة في لغة Kotlin.]
| |
− | [[تصنيف:Kotlin]]
| |
− | [[تصنيف:Kotlin Method]]
| |