Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
--force188y@juli14159 My two cents: @sarapnst is downloading it at work so it's ready to be extracted or even used at home.
-
blem1410668yIf somehow it is not obvious for someone - algorithm checks if file name is longer than X chars, if so - cut it there and add "...", but always place extension because it is important.
If you would like to prevent such nonsense, there should be if len>X+3 instead. -
sarapnst797y@--force It's been a WHILE since I haven't checked devRant, but it could be Windows 10 WiFi connectivity issue!!
-
blem1410667y@sarapnst you seem not understand what I wrote. I explained THIS alghoritm for those who wonder why it replacer 'r' with '...', pointed out that it is nonsens and presented more suitable equation which will replace 3 chars at the end if length of text is greater than limit (X) but considering those 3 letters. In fact I see now that I kinda messed that up, but my point was, that only if you replace 4+ chars with 3 dot that would make sense, cause there would be always X amount of characters.
Example
>>> X = 10
>>> text = 'abcdefgh.ij' # len == 11
>>> shorten(text) # len == 10
'abcd....ij'
However you can see on screen that is in fact single char representing dots (0x2026). -
sarapnst797y@blem14 Oh! Yeah I just hadn't read the last part, yep, Google, rewrite your algorithm as @blem14 said :))
'…' instead of a 'r'
undefined