Groups | Search | Server Info | Keyboard shortcuts | Login | Register
Groups > fr.comp.lang.javascript > #3015
| Date | 2016-08-04 07:00 +0200 |
|---|---|
| From | Guiche <guiche@invalid> |
| References | <nnte47$34k$1@usenet.pasdenom.info> |
| Subject | Re:Caractère répété |
| Newsgroups | fr.comp.lang.javascript |
| Message-ID | <57a2cc05$1@news.stben.net> (permalink) |
Gloops <gloops@zailes.invalid.org.invalid> Wrote in message: > Bonjour tout le monde, > > Quand on veut tracer un trait (horizontal), on peut écrire une boucle > pour alimenter une chaîne de caractères. > > Sinon, existe-t-il aussi une fonction intégrée pour faire ça de façon > élégante, comme par exemple, en VBS pour avoir 60 points on enverra > String(60, ".") > > Je n'ai pas essayé String(60, "-+") pour alterner deux caractères > différents ... > > Bonjour, Tu peux faire "abc".repeat(10) mais IE ne le supporte pas. Une alternative est (comme souvent) proposée sur MDN : https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Ob jets_globaux/String/repeat). Selon un MVP Excel (http://answers.microsoft.com /en-us/office/forum/office_2010-customize/repeat -function/6a6142bc-6fae-403c-af5d-ca471c13ced4?auth=1), String ne fonctionne qu'avec un caractère. ----Android NewsGroup Reader---- http://usenet.sinaapp.com/
Back to fr.comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar
Caractère répété Gloops <gloops@zailes.invalid.org.invalid> - 2016-08-03 20:45 +0200
Re:Caractère répété Guiche <guiche@invalid> - 2016-08-04 07:00 +0200
Re: Caractère répété Gloops <gloops@zailes.invalid.org.invalid> - 2016-08-04 22:05 +0200
Re: Caractère répété Gloops <gloops@zailes.invalid.org.invalid> - 2016-08-04 22:13 +0200
Re: Caractère répété Guiche <guiche@invalid> - 2016-08-04 23:34 +0200
Re: Caractère répété Gloops <gloops@zailes.invalid.org.invalid> - 2016-08-05 11:14 +0200
Re: Caractère répété Guiche <guiche@invalid> - 2016-08-08 06:18 +0200
Re: Caractère répété Guiche <guiche@invalid> - 2016-08-08 06:19 +0200
Re: Caractère répété Gloops <gloops@zailes.invalid.org.invalid> - 2016-08-09 03:02 +0200
Re: Caractère répété Guiche <guiche@invalid> - 2016-08-04 23:48 +0200
csiph-web