You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 1-js/05-data-types/03-string/article.md
+14-14Lines changed: 14 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -655,21 +655,21 @@ W rzeczywistości taka sytuacja nie zawsze ma miejsce. Znak `Ṩ` jest "dość p
655
655
656
656
Jeśli chcesz dowiedzieć się więcej o regułach i wariantach normalizacji – są one opisane w załączniku standardu Unicode: [Unicode Normalization Forms](http://www.unicode.org/reports/tr15/). Jednakże do większości praktycznych celów wystarczą informacje z tego rozdziału.
657
657
658
-
## Summary
658
+
## Podsumowanie
659
659
660
-
- There are 3 types of quotes. Backticks allow a string to span multiple lines and embed expressions`${…}`.
661
-
- Strings in JavaScript are encoded using UTF-16.
662
-
- We can use special characters like`\n`and insert letters by their unicode using`\u...`.
663
-
- To get a character, use: `[]`.
664
-
- To get a substring, use: `slice`or`substring`.
665
-
- To lowercase/uppercase a string, use: `toLowerCase/toUpperCase`.
666
-
- To look for a substring, use:`indexOf`, or`includes/startsWith/endsWith` for simple checks.
667
-
- To compare strings according to the language, use: `localeCompare`, otherwise they are compared by character codes.
660
+
- Istnieją 3 rodzaje cudzysłowów. Grawisy pozwalają ciągowi rozciągać się na wiele linii i osadzać wyrażenia`${…}`.
661
+
- Łańcuchy w JavaScript są kodowane przy użyciu UTF-16.
662
+
- Możemy używać znaków specjalnych, takich jak`\n`i wstawiać litery przy użyciu i kodu Unicode, używając`\u...`.
663
+
- Użyj `[]`, aby uzyskać pojedynczy znak.
664
+
- Aby uzyskać podciąg, użyj: `slice`lub`substring`.
665
+
- Aby pisać małymi/wielkimi literami, użyj: `toLowerCase/toUpperCase`.
666
+
- Aby wyszukać podciąg, użyj`indexOf` lub`includes/startsWith/endsWith`, gdy chcesz tylko sprawdzić, czy podciąg występuje w łańcuchu.
667
+
- Aby porównać ciągi znaków zgodnie z regułami języka, użyj: `localeCompare`.
668
668
669
-
There are several other helpful methods in strings:
669
+
Istnieje kilka innych pomocnych metod:
670
670
671
-
- `str.trim()` -- removes ("trims") spaces from the beginning and end of the string.
672
-
- `str.repeat(n)` -- repeats the string `n`times.
673
-
- ...and more to be found in the [manual](mdn:js/String).
671
+
- `str.trim()` -- usuwa ("przycina") spacje z początku i końca ciągu.
672
+
- `str.repeat(n)` -- powtarza ciąg `n`razy.
673
+
- ...i inne, które znajdziesz w [dokumentacji](https://developer.mozilla.org/pl/docs/Web/JavaScript/Reference/Global_Objects/String).
674
674
675
-
Strings also have methods for doing search/replace with regular expressions. But that's big topic, so it's explained in a separate tutorial section <info:regular-expressions>.
675
+
Istnieją również metody wyszukiwania i zastępowania za pomocą wyrażeń regularnych. Jest to jednak duży i osobny temat, więc został poświęcony mu osobny rozdział: <info:regular-expressions>.
0 commit comments