Skip to main content

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.

Filter by
Sorted by
Tagged with
983 votes
21 answers
1.3m views

Limit text length to n lines using CSS

Is it possible to limit a text length to "n" lines using CSS (or cut it when overflows vertically). text-overflow: ellipsis; only works for 1 line text. original text: Ultrices natoque mus ...
874 votes
14 answers
312k views

What does the Ellipsis object do?

While idly surfing the namespace I noticed an odd looking object called Ellipsis, it does not seem to be or do anything special, but it's a globally available builtin. After a search I found that it ...
Salim Fadhley's user avatar
713 votes
22 answers
832k views

CSS text-overflow: ellipsis; not working?

I don't know why this simple CSS isn't working... .app a { height: 18px; width: 140px; padding: 0; overflow: hidden; position: relative; margin: 0 5px 0 5px; text-align: ...
ChristopherStrydom's user avatar
412 votes
21 answers
498k views

css ellipsis on second line

CSS text-overflow: ellipsis on second line, is this possible? I can't find it on the net. example: what I want is like this: I hope someone could help me. I need an ellipsis on the second line of.....
Reigel Gallarde's user avatar
392 votes
25 answers
296k views

Android, How to limit width of TextView (and add three dots at the end of text)?

I have a TextView that I want to limit characters of it. Actually, I can do this but the thing that I'm looking for is how to add three dots (...) at the end of string. This one shows the text has ...
Hesam's user avatar
  • 53.2k
386 votes
21 answers
537k views

Truncate a string to first n characters of a string and add three dots if any characters are removed

How can I get the first n characters of a string in PHP? What's the fastest way to trim a string to a specific number of characters, and append '...' if needed?
Alex's user avatar
  • 67.5k
363 votes
23 answers
600k views

Applying an ellipsis to multiline text [duplicate]

Is there a solution to add ellipsis on last line inside a div with a fluid height (20%)? I found the -webkit-line-clamp function in CSS, but in my case the line number will be depending on window ...
Bruno Landowski's user avatar
315 votes
16 answers
211k views

With CSS, use "..." for overflowed block of multi-lines

with overflow: hidden; text-overflow: ellipsis; white-space: nowrap; "..." will be shown in the end of the line if overflowed. However, this will be shown only in one line. But I would like it to be ...
Ovilia's user avatar
  • 7,176
307 votes
10 answers
310k views

How to have Ellipsis effect on Text

I'm having a long text in my app and I need to truncate it and add three dots to the end. How can I do that in React Native Text element? Thanks
Ran Yefet's user avatar
  • 3,357
294 votes
19 answers
274k views

HTML - how can I show tooltip ONLY when ellipsis is activated

I have got a span with dynamic data in my page, with ellipsis style. .my-class { text-overflow: ellipsis; overflow: hidden; white-space: nowrap; width: 71px; } <span id="myId" class="my-...
Spiderman's user avatar
  • 9,892
288 votes
19 answers
199k views

HTML text-overflow ellipsis detection

I have some elements on my page which have the CSS rules white-space, overflow, text-overflow set, so that overflowing text is trimmed and an ellipsis is used. div { white-space: nowrap; text-...
deanoj's user avatar
  • 3,291
235 votes
5 answers
142k views

What is the ellipsis (...) for in this method signature?

In the App Engine docs, what is the ellipsis (JID...) for in this method signature? public MessageBuilder withRecipientJids(JID... recipientJids) What's the function of those three dots?
natchy's user avatar
  • 2,475
216 votes
5 answers
70k views

How to use R's ellipsis feature when writing your own function?

The R language has a nifty feature for defining functions that can take a variable number of arguments. For example, the function data.frame takes any number of arguments, and each argument becomes ...
Ryan C. Thompson's user avatar
210 votes
5 answers
68k views

How do you use the ellipsis slicing syntax in Python?

This came up in Hidden features of Python, but I can't see good documentation or examples that explain how the feature works.
miracle2k's user avatar
  • 31.3k
210 votes
5 answers
25k views

What do ellipsis [...] mean in a list?

I was playing around in python. I used the following code in IDLE: p = [1, 2] p[1:1] = [p] print p The output was: [1, [...], 2] What is this […]? Interestingly I could now use this as a list of ...
Aseem Bansal's user avatar
  • 6,912
168 votes
4 answers
10k views

Why does 1...1 evaluate to 10.1? [duplicate]

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's user avatar
  • 4,899
162 votes
12 answers
145k views

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-...
Misha Moroshko's user avatar
151 votes
24 answers
186k views

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 ...
BlaM's user avatar
  • 28.7k
116 votes
2 answers
55k views

Meaning of ...interface{} (dot dot dot interface)

Below is a piece of Go code I have question about. Specifically, what is a in this function? func DPrintf(format string, a ...interface{}) (n int, err error) { if Debug > 0 { n, err = fmt....
BufBills's user avatar
  • 7,975
104 votes
5 answers
22k views

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 ...
Spudley's user avatar
  • 168k
97 votes
19 answers
44k views

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 ...
FrederickCook's user avatar
91 votes
3 answers
45k views

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

Where can I find documentation on the usage of ... in functions? Examples would be useful.
Brandon Bertelsen's user avatar
88 votes
4 answers
100k views

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:...
Jelly Ama's user avatar
  • 6,881
69 votes
1 answer
32k views

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....
Jaiwo99's user avatar
  • 9,937
65 votes
14 answers
54k views

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, ...
Amy B's user avatar
  • 17.9k
57 votes
3 answers
20k views

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. &...
mhermans's user avatar
  • 2,157
49 votes
5 answers
60k views

text-overflow ellipsis not working in nested flexbox

I have a two-column layout created with flexboxes. In the right column, I have two rows, the first containing a header and the second containing the page content. Within the header I have three ...
Max Mumford's user avatar
  • 2,592
48 votes
4 answers
3k views

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_(...
Dycey's user avatar
  • 4,613
47 votes
2 answers
50k views

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: <style> .parent-div { width: ...
Anthony's user avatar
  • 5,353
45 votes
2 answers
26k views

Ellipsis notation in C#?

Where can I get info about implementing my own methods that have the ellipsis notation, e.g. static void my_printf(char* format, ...) { } Also is that called ellipsis notation or is there a fancier ...
y2k's user avatar
  • 65.8k
42 votes
5 answers
22k views

webkit box orient styling disappears from styling

In my Angular app (I'm on version 4.3.1) I'm adding a CSS ellipsis after multiple lines. For this, I use the following css code in Sass. .ellipsis { -webkit-box-orient: vertical; display: ...
Paul van den Dool's user avatar
41 votes
6 answers
56k views

Setting Ellipsize on TextView reduces lines shown by one (instead of only ellipsizing last)

when I am using TextView with singleLine="true" and ellipsize="end"(my top TextView), it works well but in another TextView having more then 1 lines (in my case 3 lines in my ...
Chintan Raghwani's user avatar
38 votes
1 answer
18k views

Does throw inside a catch ellipsis (...) rethrow the original error in C++?

If in my code I have the following snippet: try { doSomething(); } catch (...) { doSomethingElse(); throw; } Will the throw rethrow the specific exception caught by the default ellipsis ...
WilliamKF's user avatar
  • 42.4k
37 votes
3 answers
102k views

Showing truncated text on hover using CSS ellipsis overlaps text below it

I have a name tag in the sidebar which should display single line and truncate if long text follow by triple dots (lorem ipsum...) and should show full text on hover. I am able to achieve this using ...
Nakib's user avatar
  • 4,683
34 votes
4 answers
5k views

What is the (...) called in C and C++?

One of the uses of ... is to denote variadic entities in C and C++. What is its name? Is it classified as an operator or something else when used that way? Any other details regarding ...? Edit: I ...
Ardent Coder's user avatar
  • 3,937
33 votes
9 answers
23k views

Dart: How to Truncate String and add Ellipsis after character number

I'd like to add Ellipsis to a string after a certain character length and if the string length is not up to the character preset character length, the ellipsis (...) Should NOT be added. How do i ...
Tayo.dev's user avatar
  • 1,626
32 votes
5 answers
5k views

Can I remove an element in ... (dot-dot-dot) and pass it on?

Is it possible to remove an element from ... and pass ... onto other functions? My first two attempts failed: parent = function(...) { a = list(...) str(a) a$toRemove = NULL str(a) ...
Suraj's user avatar
  • 36.2k
30 votes
14 answers
49k views

React show Material-UI Tooltip only for text that has ellipsis

Looking for a way to have material-ui's tooltip expand the text in a table cell ONLY if the text is cut off with an ellipsis (overflowing). Currently in my table I have a cell like this: <...
dave99collins's user avatar
29 votes
3 answers
9k views

How enable ellipsis when calling Python doctest?

In Python (3.3.2) doctest, ellipsis (...) can match any string. So, for the code below def foo(): """ >>> foo() hello ... """ print("hello world") when running doctest ...
Raniere Silva's user avatar
28 votes
8 answers
8k views

Why doesn't C++ support strongly typed ellipsis?

Can someone please explain to me why C++, at least to my knowledge, doesn't implement a strongly typed ellipsis function, something to the effect of: void foo(double ...) { // Do Something } ...
Nicholas Hamilton's user avatar
27 votes
2 answers
32k views

CSS - text-overflow: ellipsis causes <li>'s number to disappear

I'm currently using ellipsis to truncate an order list's items which are more than one line long. However, the li's that are too long and require an ellipsis automatically have the number on the left ...
CHawk's user avatar
  • 1,356
27 votes
1 answer
766 views

ellipsis ... as function in substitute?

I'm having trouble understanding how/why parentheses work where they otherwise should not work®. f = function(...) substitute(...()); f(a, b) [[1]] a [[2]] b # but, substitute returns ..1 f2 = ...
Donald Seinen's user avatar
25 votes
2 answers
13k views

Ellipsize not working properly for a multiline TextView with an arbitrary maximum height

I have a TextView with an unknown maximum height, which is dependent on the device's DPI/screen resolution. So, for instance, on and MDPI device this maximum height makes it possible to show only 2 ...
DPR's user avatar
  • 780
24 votes
4 answers
14k views

How should I write three dots?

Simple question: I want to set a TextView and in that I want to have three dots (Ellipsis). Like Read more... <-- Now I'm sure I shouldn't just write ... into the String. How should I write these ...
Musterknabe's user avatar
  • 6,021
23 votes
3 answers
32k views

Get PATH environment variable in PowerShell

I want to check the PATH environment variable in PowerShell I've tried Get-ChildItem env:path I want to get the complete path, but get only a very small part of it. How much I get depends on the ...
Axel van Moorsel's user avatar
22 votes
3 answers
20k views

Check if textview is ellipsized in android

I have TextView with width as wrap content. In this TextView I set text, but text is not of the same length every time. When text is very long I use single line true and ellipsize: end. But now I have ...
user1302569's user avatar
  • 7,181
21 votes
5 answers
41k views

CSS Text-overflow Ellipsis Not Displaying

I have a div with some inner content that I need to have an ellipsis when it overflows. I've done this many times on other elements but for some reason this is not behaving as expected. Also, I left ...
sadmicrowave's user avatar
  • 40.7k
21 votes
1 answer
13k views

Meaning of the ellipsize options

I see that there are 4 different values to android:ellipsize: none,start,mid,end and marquee What is the meaning and effect of setting each of these?
png's user avatar
  • 4,408
21 votes
6 answers
13k views

using catch(...) (ellipsis) for post-mortem analysis

Someone in a different question suggested using catch(...) to capture all otherwise unhandled - unexpected/unforseen exceptions by surrounding the whole main() with the try{}catch(...){} block. It ...
SF.'s user avatar
  • 13.9k
20 votes
6 answers
15k views

MySQL truncate text with ellipsis

Suppose I have a MySQL table of one column: "Message". It is of type TEXT. I now want to query all rows, but the text can be large (not extremely large but large) and I only want to get a summary of ...
javic's user avatar
  • 843

1
2 3 4 5
16