Questions tagged [ellipsis]

An ellipsis is a series of dots, (usually 3, i.e. "…") used to indicate the omission of a word within some text, or more commonly that the preceding text has been truncated.

737 questions
168
votes
4 answers

Why does 1...1 evaluate to 10.1?

I've just faced a little PHP snippet from 3v4l: https://3v4l.org/jmrZB echo 1...1; //10.1 And I'm afraid I have no idea how to explain its results. Why is this considered valid at all?
Gino Pane
  • 4,740
  • 5
  • 31
  • 46
162
votes
12 answers

Why doesn't CSS ellipsis work in table cell?

Consider the following example: (live demo here) $(function() { console.log("width = " + $("td").width()); }); td { border: 1px solid black; width: 50px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
Misha Moroshko
  • 166,356
  • 226
  • 505
  • 746
151
votes
24 answers

Insert ellipsis (...) into HTML tag if content too wide

I have a webpage with an elastic layout that changes its width if the browser window is resized. In this layout there are headlines (h2) that will have a variable length (actually being headlines from blogposts that I don't have control over).…
BlaM
  • 28,465
  • 32
  • 91
  • 105
104
votes
5 answers

text-overflow:ellipsis in Firefox 4? (and FF5)

The text-overflow:ellipsis; CSS property must be one of the few things that Microsoft has done right for the web. All the other browsers now support it... except Firefox. The Firefox developers have been arguing over it since 2005 but despite the…
Spudley
  • 166,037
  • 39
  • 233
  • 307
96
votes
19 answers

How do I tell if my textview has been ellipsized?

I have a multi-line TextView that has android:ellipsize="end" set. I would like to know, however, if the string I place in there is actually too long (so that I may make sure the full string is shown elsewhere on the page). I could use…
FrederickCook
  • 3,018
  • 4
  • 24
  • 26
90
votes
3 answers

Usage of `...` (three-dots or dot-dot-dot) in functions

Where can I find documentation on the usage of ... in functions? Examples would be useful.
Brandon Bertelsen
  • 43,807
  • 34
  • 160
  • 255
82
votes
4 answers

How to use text-overflow ellipsis in an html input field?

My web page has input fields to which I have applied the following css : .ellip { white-space: nowrap; width: 200px; overflow: hidden; -o-text-overflow: ellipsis; -ms-text-overflow: ellipsis; text-overflow: ellipsis; } But…
Jelly Ama
  • 6,701
  • 3
  • 20
  • 23
67
votes
1 answer

Java 3 dots parameter (varargs) behavior when passed no arguments or null

I tried this and get weird behavior from JAVA, can someone explain this for me? boolean testNull(String... string) { if(string == null) { return true; } else { System.out.println(string.getClass()); return false; …
Jaiwo99
  • 9,687
  • 3
  • 36
  • 53
63
votes
14 answers

Ideal method to truncate a string with ellipsis

I'm sure all of us have seen ellipsis' on Facebook statuses (or elsewhere), and clicked "Show more" and there are only another 2 characters or so. I'd guess this is because of lazy programming, because surely there is an ideal method. Mine counts…
Amy B
  • 17,874
  • 12
  • 64
  • 83
55
votes
3 answers

Unpacking argument lists for ellipsis in R

I am confused by the use of the ellipsis (...) in some functions, i.e. how to pass an object containing the arguments as a single argument. In Python it is called "unpacking argument lists", e.g. >>> range(3, 6) # normal call with…
mhermans
  • 2,097
  • 4
  • 18
  • 31
48
votes
4 answers

What does Python mean by printing "[...]" for an object reference?

I'm printing a value of a what I thought was a list, but the output that I get is: [...] What does this represent? How do I test for it? I've tried: myVar.__repr__() != '[...]' and myVar.__repr_() != Ellipsis but no dice... Here's a cutdown of…
Dycey
  • 4,767
  • 5
  • 47
  • 86
47
votes
2 answers

CSS text ellipsis when using variable width divs

I'm wondering if there is any way do have text in a floating div gain ellipsis when the parent div and neighboring div don't allow enough room. For example: