fix(guide): simplify directory structure

This commit is contained in:
Mrugesh Mohapatra
2018-10-16 21:26:13 +05:30
parent f989c28c52
commit da0df12ab7
35752 changed files with 0 additions and 317652 deletions

View File

@@ -0,0 +1,13 @@
---
title: String
localeTitle: خيط
---
## خيط
في JavaScript ، يكون الكائن العام `String` هو مُنشئ للسلاسل ، والتي تخزن سلسلة من الأحرف. يمكن إنشاء سلاسل في شكل حرفي ، مثل `var greeting = "Hi, campers!";` أو باستخدام مُنشئ `String` : `var greeting = new String("Hi, campers!");` .
وخلافا لبعض اللغات الأخرى، وجافا سكريبت لا يهمني إذا كنت تستخدم واحد `' '` أو مزدوجة `" "` نقلت عن السلاسل. يمكنك حتى استخدامها اخل_ السلاسل ، يجب أن تكون مختلفة عن علامات الاقتباس التي تحتضن السلسلة `"Isn't that awesome?"` .
#### معلومات اكثر:
[MDN web docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) [w3schools.com](https://www.w3schools.com/jsref/jsref_obj_string.asp)

View File

@@ -0,0 +1,34 @@
---
title: String fromCharCode
localeTitle: سلسلة من CharCode
---
إرجاع الأسلوب `String.fromCharCode()` ثابت سلسلة تم إنشاؤها باستخدام التسلسل المحدد من قيم Unicode.
## بناء الجملة
`String.fromCharCode(num1[, ...[, numN]])
`
### المعلمات
**num1، ...، numN**
تسلسل من الأرقام التي تكون قيم Unicode.
[وصلة MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/fromCharCode) | [رابط MSDN](https://msdn.microsoft.com/en-us/LIBRary/wb4w0k66%28v=vs.94%29.aspx)
## وصف
هذا الأسلوب بإرجاع سلسلة وليس كائن سلسلة.
لأن `fromCharCode()` هو أسلوب ثابت من String ، فأنت تستخدمه دائمًا كـ `String.fromCharCode()` ، بدلاً من استخدامه كطريقة لعنصر String الذي قمت بإنشائه.
## أمثلة
`String.fromCharCode(65, 66, 67); // "ABC"
var test = String.fromCharCode(112, 108, 97, 105, 110);
document.write(test);
// Output: plain
`

View File

@@ -0,0 +1,11 @@
---
title: String Fromcodepoint
localeTitle: سلسلة Fromcodepoint
---
## سلسلة Fromcodepoint
هذا هو كعب. [ساعد مجتمعنا على توسيعه](https://github.com/freecodecamp/guides/tree/master/src/pages/javascript/standard-objects/string/string-fromcodepoint/index.md) .
[سيساعدك دليل النمط السريع هذا على ضمان قبول طلب السحب](https://github.com/freecodecamp/guides/blob/master/README.md) .
#### معلومات اكثر:

View File

@@ -0,0 +1,48 @@
---
title: String Length
localeTitle: طول سلسلة
---
على `length` تمثل الممتلكات طول السلسلة.
## بناء الجملة
`str.length
`
[وصلة MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/length) | [رابط MSDN](https://msdn.microsoft.com/en-us/LIBRary/3d616214%28v=vs.94%29.aspx)
## وصف
هذه الخاصية بإرجاع عدد وحدات التعليمات البرمجية في السلسلة. يستخدم تنسيق UTF-16 ، وهو تنسيق السلسلة الذي تستخدمه جافا سكريبت ، وحدة رموز مفردة 16 بت لتمثيل أكثر الرموز شيوعًا ، ولكنه يحتاج إلى استخدام وحدتي تعليمات برمجية للأحرف الأقل استخدامًا ، لذلك من الممكن إرجاع القيمة حسب الطول إلى غير متطابق مع العدد الفعلي للأحرف في السلسلة.
بالنسبة لسلسلة فارغة ، يكون الطول 0.
الخاصية `String.length` ثابتة إرجاع القيمة 1.
## أمثلة
`var x = 'Mozilla';
var empty = '';
console.log('Mozilla is ' + x.length + ' code units long');
/* "Mozilla is 7 code units long" */
console.log('The empty string has a length of ' + empty.length);
/* "The empty string has a length of 0" */
var str = "every good boy does fine";
var start = 0;
var end = str.length - 1;
var tmp = "";
var arr = new Array(end);
while (end >= 0) {
arr[start++] = str.charAt(end--);
}
// Join the elements of the array with a
var str2 = arr.join('');
document.write(str2);
// Output: enif seod yob doog yreve
`

View File

@@ -0,0 +1,39 @@
---
title: String.prototype.charAt
localeTitle: String.prototype.charAt
---
إرجاع الأسلوب `charAt()` الحرف المحدد من سلسلة.
## بناء الجملة
`str.charAt(index)
`
## المعلمات
**فهرس**
عدد صحيح بين 0 و 1 - أقل من طول السلسلة.
[وصلة MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/charAt) | [رابط MSDN](https://msdn.microsoft.com/en-us/LIBRary/65zt5h10%28v=vs.94%29.aspx)
## وصف
تتم فهرسة الأحرف في سلسلة من اليسار إلى اليمين. فهرس الحرف الأول هو 0 ، والفهرس للحرف الأخير في سلسلة تسمى `stringName` هو `stringName.length - 1` . إذا كان الفهرس الذي أدخلته خارج النطاق ، فسيقوم جافا سكريبت بإرجاع سلسلة فارغة.
## أمثلة
`var anyString = 'Brave new world';
console.log("The character at index 0 is '" + anyString.charAt(0) + "'"); // 'B'
console.log("The character at index 1 is '" + anyString.charAt(1) + "'"); // 'r'
console.log("The character at index 2 is '" + anyString.charAt(2) + "'"); // 'a'
console.log("The character at index 3 is '" + anyString.charAt(3) + "'"); // 'v'
console.log("The character at index 4 is '" + anyString.charAt(4) + "'"); // 'e'
console.log("The character at index 999 is '" + anyString.charAt(999) + "'"); // ''
var str = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
document.write(str.charAt(str.length - 1));
// Output: Z
`

View File

@@ -0,0 +1,34 @@
---
title: String.prototype.charCodeAt
localeTitle: String.prototype.charCodeAt
---
إرجاع الأسلوب `charCodeAt()` قيمة Unicode الرقمية للحرف في الفهرس المحدد (باستثناء codepoints unicode> 0x10000).
## بناء الجملة
`str.charCodeAt(index)
`
### المعلمات
**فهرس**
عدد صحيح أكبر من أو يساوي 0 وأقل من طول السلسلة ؛ إذا لم يكن رقمًا ، فسيكون الإعداد الافتراضي صفرًا.
[وصلة MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/charCodeAt) | [رابط MSDN](https://msdn.microsoft.com/en-us/LIBRary/hza4d04f%28v=vs.94%29.aspx)
## وصف
لاحظ أن `charCodeAt()` ستقوم دائمًا بإرجاع قيمة أقل من 65536. وذلك لأن نقاط التعليمة البرمجية الأعلى يتم تمثيلها بواسطة زوج من الأحرف الزائفة (البديلة ذات القيمة المنخفضة) التي يتم استخدامها لتضمين الحرف الحقيقي. وبسبب هذا ، لفحص أو إعادة إنشاء الحرف الكامل للأحرف الفردية بقيمة 65536 وما فوق ، بالنسبة لمثل هذه الأحرف ، من الضروري استرداد `charCodeAt(i)` ، وكذلك `charCodeAt(i+1)` (كما لو كان فحص / إعادة إنتاج سلسلة بحرفين). انظر المثال 2 و 3 أدناه.
إرجاع `charCodeAt()` `NaN` إذا كان `index` المعطى أقل من 0 أو يساوي أو أكبر من طول السلسلة.
## أمثلة
`'ABC'.charCodeAt(0); // returns 65
var str = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
document.write(str.charCodeAt(str.length - 1));
// Output: 90
`

View File

@@ -0,0 +1,11 @@
---
title: String.prototype.codePointAt
localeTitle: String.prototype.codePointAt
---
## String.prototype.codePointAt
هذا هو كعب. [ساعد مجتمعنا على توسيعه](https://github.com/freecodecamp/guides/tree/master/src/pages/javascript/standard-objects/string/string-prototype-codepointat/index.md) .
[سيساعدك دليل النمط السريع هذا على ضمان قبول طلب السحب](https://github.com/freecodecamp/guides/blob/master/README.md) .
#### معلومات اكثر:

View File

@@ -0,0 +1,36 @@
---
title: String.prototype.concat
localeTitle: String.prototype.concat
---
يجمع الأسلوب concat () بين نص سلسلتين أو أكثر ويعيد سلسلة جديدة.
**بناء الجملة**
`str.concat(string2[,..., stringN]);
`
## المعلمات
**string2… string _N_** السلاسل التي سيتم وصلها إلى هذه السلسلة.
[وصلة MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/concat)
## وصف
يجمع الأسلوب concat () بين نص سلسلتين أو أكثر ويعيد السلسلة المتسلسلة. لا يقوم بتعديل السلاسل الأصلية.
## أمثلة
**سلاسل متسلسلة**
` var str1 = "Hello";
var str2 = "World";
console.log(str1.concat(str2));
// Console will output: HelloWorld
var str2 = "Hello, ";
console.log(str2.concat(" Welcome ", "to FCC."));
// Console will output: Hello, Welcome to FCC.
`
المصدر \[MDN\]

View File

@@ -0,0 +1,21 @@
---
title: String.prototype.endsWith
localeTitle: String.prototype.endsWith
---
## String.prototype.endsWith
`endsWith()` طريقة `endsWith()` ما إذا كانت السلسلة تنتهي بإدخال السلسلة وإرجاع قيمة منطقية.
### فمثلا
`let str = "Hello world";
let bool = str.endsWith("ld") // true
bool = str.endsWith("llo") // false
`
يمكن أن تقبل هذه الطريقة أيضًا معلمة أخرى ، وهي `length` الذي يحدد قبل أي حرف للبحث في السلسلة.
`let str = "Hello world";
let bool = str.endsWith("ld", 5) // false, it's the same as "Hello".endsWith("ld")
bool = str.endsWith("llo", 5) // true, it's the same as "Hello".endsWith("llo")
`

View File

@@ -0,0 +1,53 @@
---
title: String.prototype.includes
localeTitle: String.prototype.includes
---
## String.prototype.includes
هذا هو كعب. [ساعد مجتمعنا على توسيعه](https://github.com/freecodecamp/guides/tree/master/src/pages/javascript/standard-objects/string/string-prototype-includes/index.md) .
[سيساعدك دليل النمط السريع هذا على ضمان قبول طلب السحب](https://github.com/freecodecamp/guides/blob/master/README.md) .
يتم استخدام الأسلوب `includes()` لتحديد ما إذا كان يمكن العثور على سلسلة واحدة في سلسلة أخرى أم لا. تقوم هذه الطريقة بإرجاع قيمة منطقية (إما `true` أو `false` ).
من المهم ملاحظة أن هذه الطريقة حساسة لحالة الأحرف.
**بناء الجملة**
`string.includes(searchString[, position])
`
**المعلمات**
تتطلب هذه الطريقة معلمة واحدة فقط (searchString). ومع ذلك ، من خلال تضمين معلمة ثانية (الموضع) ، يمكنك بدء البحث عن سلسلة داخل سلسلة من موضع معين (أو فهرس) في searchString.
**أمثلة**
`let string = "Roses are red, violets are blue.";
string.includes('red'); // returns true
`
`let string = "Roses are red, violets are blue.";
string.includes('Red'); // returns false
`
`let string = "Roses are red, violets are blue.";
string.includes('red',12); // returns false because 'red' starts at position 9, and our search begins at position 12.
`
`let string = "Roses are red, violets are blue.";
string.includes('blue',12); // returns true because 'blue' starts after our search begins at position 12.
`
`let string = "Roses are red, violets are blue.";
string.includes('violets are blue'); // returns true
`
#### معلومات اكثر:
[MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes)

View File

@@ -0,0 +1,42 @@
---
title: String.prototype.indexOf
localeTitle: String.prototype.indexOf
---
## String.prototype.indexOf
إرجاع الأسلوب `indexOf()` الفهرس الأول الذي يمكن العثور على عنصر معين في الصفيف. إذا كان العنصر غير موجود ، فسوف يقوم بإرجاع -1.
**بناء الجملة**
`str.indexOf(searchValue[, fromIndex])
`
### المعلمات
* **searchValue** Substring التي تبحث عنها. إذا كان هذا فارغًا ( `''` ) ولا توجد معلمة `fromIndex` ، فسيؤدي ذلك إلى إرجاع 0.
* **fromIndex** اختياري. الفهرس الذي تريد بدء البحث فيه. إذا كانت قيمة `fromIndex` أكبر من أو تساوي طول السلسلة ، فلن يتم البحث في السلسلة ويعيد الأسلوب -1. إذا كان `searchValue` عبارة عن سلسلة فارغة ( `''` ) وكان `fromIndex` أقل من طول السلسلة ، فسوف يقوم بإرجاع `fromIndex` ؛ خلاف ذلك ، فإنه سيعود طول السلسلة. (سيتم التعامل مع الرقم السالب كما لو لم تكن هناك وسيطة.)
### وصف
يتحقق الأسلوب `indexOf()` السلسلة من اليسار إلى اليمين. مؤشر الحرف الأول هو 0؛ فهرس الحرف الأخير هو `string.length - 1` . تتحقق الطريقة من كل سلسلة فرعية مقابل `searchValue` باستخدام المساواة التامة ( `===` ) ، مما يعني أن هذه الطريقة حساسة لحالة الأحرف. بمجرد العثور على سلسلة فرعية ترجع `true` ، فإنها تُرجع الفهرس الخاص بحرفها الأول.
### أمثلة
`'Blue Whale'.indexOf('Blue'); // returns 0
'Blue Whale'.indexOf('Blute'); // returns -1
'Blue Whale'.indexOf('Whale', 0); // returns 5
'Blue Whale'.indexOf('Whale', 5); // returns 5
'Blue Whale'.indexOf('Whale', 7); // returns -1
'Blue Whale'.indexOf(''); // returns 0
'Blue Whale'.indexOf('', 9); // returns 9
'Blue Whale'.indexOf('', 10); // returns 10
'Blue Whale'.indexOf('', 11); // returns 10
'Blue Whale'.indexOf('blue'); // returns -1
`
### معلومات اكثر:
* وثائق [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/indexOf) : [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/indexOf)
* وثائق [MSDN](https://docs.microsoft.com/en-us/scripting/javascript/reference/indexof-method-string-javascript) : [MSDN](https://docs.microsoft.com/en-us/scripting/javascript/reference/indexof-method-string-javascript)

View File

@@ -0,0 +1,11 @@
---
title: String.prototype.lastIndexOf
localeTitle: String.prototype.lastIndexOf
---
## String.prototype.lastIndexOf
هذا هو كعب. [ساعد مجتمعنا على توسيعه](https://github.com/freecodecamp/guides/tree/master/src/pages/javascript/standard-objects/string/string-prototype-lastindexof/index.md) .
[سيساعدك دليل النمط السريع هذا على ضمان قبول طلب السحب](https://github.com/freecodecamp/guides/blob/master/README.md) .
#### معلومات اكثر:

View File

@@ -0,0 +1,11 @@
---
title: String.prototype.localecompare
localeTitle: String.prototype.localecompare
---
## String.prototype.localecompare
هذا هو كعب. [ساعد مجتمعنا على توسيعه](https://github.com/freecodecamp/guides/tree/master/src/pages/javascript/standard-objects/string/string-prototype-localecompare/index.md) .
[سيساعدك دليل النمط السريع هذا على ضمان قبول طلب السحب](https://github.com/freecodecamp/guides/blob/master/README.md) .
#### معلومات اكثر:

View File

@@ -0,0 +1,11 @@
---
title: String.prototype.match
localeTitle: String.prototype.match
---
## String.prototype.match
هذا هو كعب. [ساعد مجتمعنا على توسيعه](https://github.com/freecodecamp/guides/tree/master/src/pages/javascript/standard-objects/string/string-prototype-match/index.md) .
[سيساعدك دليل النمط السريع هذا على ضمان قبول طلب السحب](https://github.com/freecodecamp/guides/blob/master/README.md) .
#### معلومات اكثر:

View File

@@ -0,0 +1,11 @@
---
title: String.prototype.normalize
localeTitle: String.prototype.normalize
---
## String.prototype.normalize
هذا هو كعب. [ساعد مجتمعنا على توسيعه](https://github.com/freecodecamp/guides/tree/master/src/pages/javascript/standard-objects/string/string-prototype-normalize/index.md) .
[سيساعدك دليل النمط السريع هذا على ضمان قبول طلب السحب](https://github.com/freecodecamp/guides/blob/master/README.md) .
#### معلومات اكثر:

View File

@@ -0,0 +1,11 @@
---
title: String.prototype.padEnd
localeTitle: String.prototype.padEnd
---
## String.prototype.padEnd
هذا هو كعب. [ساعد مجتمعنا على توسيعه](https://github.com/freecodecamp/guides/tree/master/src/pages/javascript/standard-objects/string/string-prototype-padend/index.md) .
[سيساعدك دليل النمط السريع هذا على ضمان قبول طلب السحب](https://github.com/freecodecamp/guides/blob/master/README.md) .
#### معلومات اكثر:

View File

@@ -0,0 +1,11 @@
---
title: String.prototype.padStart
localeTitle: String.prototype.padStart
---
## String.prototype.padStart
هذا هو كعب. [ساعد مجتمعنا على توسيعه](https://github.com/freecodecamp/guides/tree/master/src/pages/javascript/standard-objects/string/string-prototype-padstart/index.md) .
[سيساعدك دليل النمط السريع هذا على ضمان قبول طلب السحب](https://github.com/freecodecamp/guides/blob/master/README.md) .
#### معلومات اكثر:

View File

@@ -0,0 +1,20 @@
---
title: String.prototype.repeat
localeTitle: String.prototype.repeat
---
## String.prototype.repeat
يحصل على طريقة `.repeat(n)` معلماً صحيحاً ويعيد السلسلة `n` المكررة.
### فمثلا
` let str = "test";
console.log(str.repeat(3)); // "testtesttest", test is repeated 3 times
// NB
console.log(str.repeat(2.5)); // "testtest", 2.5 is converted to an integer and test is repeated 2 times
`
#### معلومات اكثر
[MDN - String.prototype.repeat ()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat)

View File

@@ -0,0 +1,11 @@
---
title: String.prototype.replace
localeTitle: String.prototype.replace
---
## String.prototype.replace
هذا هو كعب. [ساعد مجتمعنا على توسيعه](https://github.com/freecodecamp/guides/tree/master/src/pages/javascript/standard-objects/string/string-prototype-replace/index.md) .
[سيساعدك دليل النمط السريع هذا على ضمان قبول طلب السحب](https://github.com/freecodecamp/guides/blob/master/README.md) .
#### معلومات اكثر:

View File

@@ -0,0 +1,11 @@
---
title: String.prototype.search
localeTitle: String.prototype.search
---
## String.prototype.search
هذا هو كعب. [ساعد مجتمعنا على توسيعه](https://github.com/freecodecamp/guides/tree/master/src/pages/javascript/standard-objects/string/string-prototype-search/index.md) .
[سيساعدك دليل النمط السريع هذا على ضمان قبول طلب السحب](https://github.com/freecodecamp/guides/blob/master/README.md) .
#### معلومات اكثر:

View File

@@ -0,0 +1,46 @@
---
title: String.prototype.slice
localeTitle: String.prototype.slice
---
`.slice()` الأسلوب سلسلة JavaScript `.slice()` جزء من سلسلة وإرجاع سلسلة جديدة.
## بناء الجملة
`str.slice(beginSliceIndex [, endSliceIndex]);
`
## المعلمات
**beginSliceIndex**
مؤشر الصفر القائم حيث يجب أن تبدأ الشريحة. إذا كان startSliceIndex عبارة عن رقم سالب ، فإن `.slice()` تعول إلى الخلف من نهاية السلسلة لتحديد مكان بدء الشريحة.
**endSliceIndex**
اختياري. فهرس يستند إلى الصفر حيث يجب أن تنتهي الشريحة. إذا تم حذفها ، `.slice()` استخراج `.slice()` إلى نهاية السلسلة.
[وصلة MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice)
## وصف
`.slice()` النص خارج سلسلة واحدة ويعيد سلسلة جديدة.
## أمثلة
**باستخدام `.slice()` لإنشاء سلسلة جديدة**
`var string1 = "Hello World!";
var string2 = string1.slice(3);
console.log(string2); // Will log "lo World!"
var string3 = string1.slice(3, 7);
console.log(string3); // Will log "lo W"
`
**باستخدام `.slice()` مع مؤشرات سلبية**
`var string = "Hello World!"
str.slice(-3); // Returns "ld!"
str.slice(-3, -1); // Returns "ld"
str.slice(0, -1); // Returns "Hello World"
`

View File

@@ -0,0 +1,38 @@
---
title: String.prototype.split
localeTitle: String.prototype.split
---
## String.prototype.split
تقوم الدالة `split()` بفصل السلسلة الأصلية إلى سلاسل فرعية ، استنادًا إلى _سلسلة فاصلة_ تمررها كمدخل.
إن ناتج الدالة `split()` هو `Array` من السلاسل ، التي تمثل الأجزاء الفرعية المنفصلة عن السلسلة الأصلية.
لا يتم تبديل السلسلة الأصلية بواسطة الدالة `split()` .
أمثلة:
`// We have a regular string
"Hello. I am a string. You can separate me."
// Let's use the split function to separate the string by the period character:
"Hello. I am a string. You can separate me.".split(".");
// output is [ "Hello", " I am a string", " You can separate me", "" ]
`
بما أننا استخدمنا النقطة ( `.` ) _كسلسلة فاصلة_ ، فإن السلاسل في صفيف الخرج لا تحتوي على الفترة الموجودة فيها ؛ ا تتضمن_ سلاسل فصل الإخراج _سلسلة سلسلة فاصل الإدخال نفسه_ .
ليس من الضروري أن يكون اصل السلسلة_ حرفًا واحدًا ، يمكن أن يكون أي سلسلة أخرى:
`"Hello... I am another string... keep on learning!".split("...");
// output is [ "Hello", " I am another string", " keep on learning!" ]
const names = "Kratos- Atreus- Freya- Hela- Thor- Odin";
// notice separator is a dash and a space
names.split("- ");
// output is [ "Kratos", "Atreus", "Freya", "Hela", "Thor", "Odin" ]
`
#### معلومات اكثر:
* [String.prototype.split على MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split)

View File

@@ -0,0 +1,11 @@
---
title: String.prototype.startsWith
localeTitle: String.prototype.startsWith
---
## String.prototype.startsWith
هذا هو كعب. [ساعد مجتمعنا على توسيعه](https://github.com/freecodecamp/guides/tree/master/src/pages/javascript/standard-objects/string/string-prototype-startswith/index.md) .
[سيساعدك دليل النمط السريع هذا على ضمان قبول طلب السحب](https://github.com/freecodecamp/guides/blob/master/README.md) .
#### معلومات اكثر:

View File

@@ -0,0 +1,31 @@
---
title: String.prototype.substr
localeTitle: String.prototype.substr
---
## String.prototype.substr
تقوم طريقة substr () باستخلاص أجزاء من سلسلة ، تبدأ بالحرف في الموضع المحدد ، وتقوم بإرجاع عدد الأحرف المحدد.
#### بناء الجملة
` string.substr(start, length);
`
#### قيمه المعامل
| المعلمة | الوصف | | : ------------- | : ------------- | | تبدأ **مطلوب.** الموقف من أين تبدأ الاستخراج. أول حرف في الفهرس 0. إذا كانت _البداية_ موجبة وأكبر من أو تساوي طول السلسلة ، فسوف تقوم substr () بإرجاع سلسلة فارغة. إذا كانت _البداية_ سالبة ، فإن substr () تستخدمها كمؤشر حرف من نهاية السلسلة. إذا كانت _البداية_ سالبة أو أكبر من طول السلسلة ، فسيتم تعيين البداية إلى 0 | | الطول **اختياري** . عدد الحروف المراد استخراجها. إذا تم حذفه ، فإنه يستخرج باقي السلسلة |
#### أمثلة:
`let str = "Hello world!";
let res = str.substr(1, 4);
`
ستكون نتيجة الدقة:
`ello
`
#### معلومات اكثر:
[جافا سكريبت سلسلة substr () طريقة](https://www.w3schools.com/jsref/jsref_substr.asp) .

View File

@@ -0,0 +1,28 @@
---
title: String.prototype.substring
localeTitle: String.prototype.substring
---
## String.prototype.substring
تقوم الدالة `substring()` استخلاص_ تسلسل من الأحرف من سلسلة معينة أخرى. لا يغير السلسلة الأصلية.
يمكنك تحديد التسلسل لاستخراج مع هرس حرف البداية والنهاية_ . يتم تمرير هذه الفهارس في الدالة `substring()` كمعلمات. يتم تشكيل سلسلة فرعية من حرف مؤشر البداية على طول الطريق إلى شخصية مؤشر نهاية. يتم حساب كل من الفهارس من بداية السلسلة ، بدءًا من `0` .
أمثلة:
`"Hello, campers".substring(7, 14);
// output is "campers"
"Hello, world".substring(0, 5);
// output is "Hello"
`
يمكنك أيضًا حذف معلمة فهرس الأحرف الأخيرة ، وسيتم استخراج التسلسل الفرعي من فهرس البدء حتى نهاية السلسلة. مثال:
`"Hello, campers!".substring(7);
// output is "campers!"
`
#### معلومات اكثر:
* [String.prototype.substring () على MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substring)

View File

@@ -0,0 +1,11 @@
---
title: String.prototype.toLocaleLowerCase
localeTitle: String.prototype.toLocaleLowerCase
---
## String.prototype.toLocaleLowerCase
هذا هو كعب. [ساعد مجتمعنا على توسيعه](https://github.com/freecodecamp/guides/tree/master/src/pages/javascript/standard-objects/string/string-prototype-tolocalelowercase/index.md) .
[سيساعدك دليل النمط السريع هذا على ضمان قبول طلب السحب](https://github.com/freecodecamp/guides/blob/master/README.md) .
#### معلومات اكثر:

View File

@@ -0,0 +1,11 @@
---
title: String.prototype.toLocaleUpperCase
localeTitle: String.prototype.toLocaleUpperCase
---
## String.prototype.toLocaleUpperCase
هذا هو كعب. [ساعد مجتمعنا على توسيعه](https://github.com/freecodecamp/guides/tree/master/src/pages/javascript/standard-objects/string/string-prototype-tolocaleuppercase/index.md) .
[سيساعدك دليل النمط السريع هذا على ضمان قبول طلب السحب](https://github.com/freecodecamp/guides/blob/master/README.md) .
#### معلومات اكثر:

View File

@@ -0,0 +1,23 @@
---
title: String.prototype.toLowerCase
localeTitle: String.prototype.toLowerCase
---
ستقوم طريقة مصفوفة JavaScript `.toLowerCase()` بإرجاع قيمة السلسلة المحولة إلى `.toLowerCase()` صغيرة. لا يتم تغيير السلسلة الأصلية.
**بناء الجملة**
` string.toLowerCase()
`
## أمثلة
` var shout = "I AM SHOUTING VERY LOUDLY"
var whisper = shout.toLowerCase()
console.log(shout) // will return "I AM SHOUTING VERY LOUDLY"
console.log(whisper) // will return "i am shouting very loudly"
`
#### معلومات اكثر:
المصدر: [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLowerCase)

View File

@@ -0,0 +1,11 @@
---
title: String.prototype.toString
localeTitle: String.prototype.toString
---
## String.prototype.toString
هذا هو كعب. [ساعد مجتمعنا على توسيعه](https://github.com/freecodecamp/guides/tree/master/src/pages/javascript/standard-objects/string/string-prototype-tostring/index.md) .
[سيساعدك دليل النمط السريع هذا على ضمان قبول طلب السحب](https://github.com/freecodecamp/guides/blob/master/README.md) .
#### معلومات اكثر:

View File

@@ -0,0 +1,17 @@
---
title: String.prototype.toUpperCase
localeTitle: String.prototype.toUpperCase
---
ترجع طريقة JavaScript `.toUpperCase()` نفس السلسلة التي تم استدعاؤها ، ولكن في كل الحالة العليا.
**بناء الجملة**
`str.toUpperCase()
`
## أمثلة
`console.log("hello world".toUpperCase()); // Console will output "HELLO WORLD"
`
مصدر [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase)

View File

@@ -0,0 +1,21 @@
---
title: String.prototype.trim
localeTitle: String.prototype.trim
---
## String.prototype.trim
تقوم الدالة `trim()` بإزالة أية أحرف بيضاء من كل من بداية ونهاية سلسلة معينة. لا يقوم بتعديل السلسلة الأصلية؛ انها تنتج واحدة جديدة.
أمثلة:
`" Hello, campers. I have spaces on both ends! ".trim();
// output is "Hello, campers. I have spaces on both ends!"
`
`trim()` لا يزيل فقط أحرف الفضاء. يزيل أي حرف مسافة بيضاء ، مثل علامات التبويب ، فواصل الأسطر ، فواصل عدم الانكسار ، إلخ.
وهذا مفيد ، على سبيل المثال ، عندما تريد معالجة إدخال نص من مستخدم وقد يكون قد أرسل سلسلة تحتوي على مسافات في النهاية قد لا تريدها.
#### معلومات اكثر:
* [String.prototype.trim () على MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/Trim)

View File

@@ -0,0 +1,11 @@
---
title: String.prototype.trimLeft
localeTitle: String.prototype.trimLeft
---
## String.prototype.trimLeft
هذا هو كعب. [ساعد مجتمعنا على توسيعه](https://github.com/freecodecamp/guides/tree/master/src/pages/javascript/standard-objects/string/string-prototype-trimleft/index.md) .
[سيساعدك دليل النمط السريع هذا على ضمان قبول طلب السحب](https://github.com/freecodecamp/guides/blob/master/README.md) .
#### معلومات اكثر:

View File

@@ -0,0 +1,11 @@
---
title: String.prototype.trimright
localeTitle: String.prototype.trimright
---
## String.prototype.trimright
هذا هو كعب. [ساعد مجتمعنا على توسيعه](https://github.com/freecodecamp/guides/tree/master/src/pages/javascript/standard-objects/string/string-prototype-trimright/index.md) .
[سيساعدك دليل النمط السريع هذا على ضمان قبول طلب السحب](https://github.com/freecodecamp/guides/blob/master/README.md) .
#### معلومات اكثر:

View File

@@ -0,0 +1,11 @@
---
title: String.prototype.valueOf
localeTitle: String.prototype.valueOf
---
## String.prototype.valueOf
هذا هو كعب. [ساعد مجتمعنا على توسيعه](https://github.com/freecodecamp/guides/tree/master/src/pages/javascript/standard-objects/string/string-prototype-valueof/index.md) .
[سيساعدك دليل النمط السريع هذا على ضمان قبول طلب السحب](https://github.com/freecodecamp/guides/blob/master/README.md) .
#### معلومات اكثر:

View File

@@ -0,0 +1,11 @@
---
title: String Raw
localeTitle: سلسلة الخام
---
## سلسلة الخام
هذا هو كعب. [ساعد مجتمعنا على توسيعه](https://github.com/freecodecamp/guides/tree/master/src/pages/javascript/standard-objects/string/string-raw/index.md) .
[سيساعدك دليل النمط السريع هذا على ضمان قبول طلب السحب](https://github.com/freecodecamp/guides/blob/master/README.md) .
#### معلومات اكثر: