Questions tagged [trailing]

Trailing characters are characters at the end of a string that should be removed for reason (eg. trailing zeros in "0.5000", trailing spaces in "hello ", trailing slash in a URL, trailing newline character, etc.).

This tag should be used for questions related to strings formatting issues, either when the goal is to parse the string or to display it. However context may be very different from one question to the other, and this tag covers a wide area.

217 questions
0
votes
2 answers

SQLPLUS SPOOL - TO_CHAR on NUMBER field adding a trailing space

Hi I am using a sql script to extract data in a file using a spool command. I am converting one column that is numeric to to_CHAR and it is adding an extra space at the end. I have used FM0000 as a format but not sure why the trailing space is added…
0
votes
1 answer

How to remove trailing zeros using Sybase SQL?

Possible Duplicate: Remove trailing zeros from decimal in SQL Server I have a column DECIMAL(9,6) i.e. it supports values like 999,123456. But when I insert data like 123,4567 it becomes 123,456700 How to remove those zeros in sybase SQL? Using…
aF.
  • 64,980
  • 43
  • 135
  • 198
0
votes
1 answer

301 redirect url with parameters to non-trailing slash url (htaccess)

Hi we’re using wordpress in apache server. We want to 301 redirect our specific path with trailing slash to non trailing slash. Example: https://www.example.com/action/villa/?city=Ankara&area=etimesgut/ to…
0
votes
1 answer

Remove trailing / from list of links

I have a list of URLs, and I am trying to remove the trailing '/' from all URLs in the list. I have tried all of these variations with no error message, but no removal of the /: for link in url_list: if link.endswith('/'): …
coult
  • 117
  • 1
  • 2
  • 6
0
votes
1 answer

factorial trailing zeroes BigO problems

when I submit to leetcode, it run case 500/502 but failed, reason: 1808548329. But when I run it on my own mac, it gave the same answer as the accepted one. my code : int trailingZeroes(int n) { int count = 0; int tmp = 0; //check every…
ch-yk
  • 1
  • 2
0
votes
1 answer

Bootstrap slider decimal trailing issue

Look into the first image, last trailing zero truncates in a slider. From back-end side data are coming as per the rounding, but not showing properly in the slider. JSP Page : Did not find any solution, Please help me on this. TIA
sachin
  • 1,447
  • 4
  • 14
  • 22
0
votes
2 answers

How can I read a character that is mistakenly typed at the end of an expecting floating point number?

I have this code, that prompts the user to enter a 2D vector, and I want to build in error protection so if a character, symbol, etc is entered instead of a character, it prints an error and prompts again. Assuming that this code works…
0
votes
1 answer

Htaccess redirect fails for URLs without trailing slash

I am struggling with htaccess redirects from both: /folder/subfolder/any-value/ and /folder/subfolder/any-value to /another-folder/any-value/ The code below works for /folder/subfolder/any-value/ to /another-folder/any-value/ But…
Edmund
  • 65
  • 2
  • 10
0
votes
2 answers

Adding trailing zeros to Timestamp string in HH:MM:SS.ssssss format

Consider a string representation timestamp as "2017-06-05T19:27:10.917360". But if there are continous trailing zeros to above timestamp, Upstream system truncates zeros for second and milliseconds in above example like "2017-06…
donm
  • 1,160
  • 13
  • 20
0
votes
1 answer

Redirect all pages with trailing to the URL without trailing WHEN part of the root is a folder

I have tried all codes found to redirect my pages when typing them with trailing to the root URL, BUT it works only for URL which are not folders, i.e. for a link /mylink.html I have the folder "mylink" and inside it I put my articles, so I try to…
0
votes
2 answers

RTRIM does not remove spaces at the end?

I have used the Query: update Table set Seg = RTRIM(Seg) This still doesn't remove the extra spaces at the end? I really need to remove this as I am doing vlookups in Excel and it is causing problems. The datatype of Seg column is…
Sorath
  • 543
  • 3
  • 10
  • 32
0
votes
1 answer

Write method with trailing return type to change based on method call?

I have a class titled Eclipse with a private struct member containing ~30 fields of various data types. I have a method that will return a data field from the struct, based on a field number passed in as a parameter. Seeing as the struct contains…
0
votes
1 answer

CodeChef C_HOLIC2 Solution Find the smallest N whose factorial produces P Trailing Zeroes

For CodeChef problem C_HOLIC2, I tried iterating over elements: 5, 10, 15, 20, 25,... and for each number checking the number of trailing zeros using the efficient technique as specified over here, but got TLE. What is the fastest way to solve this…
Kartik Shenoy
  • 308
  • 3
  • 14
0
votes
1 answer

C++ : Remove trailing zeroes from fractional part of double variable

I am looking to remove the trailing zeros from the double variable and assign the result back to double variable. Please note that I am on C++ 98. I am not looking to print out (using snprintf, cout or printf with %g); I am looking to remove the…
Mihir
  • 531
  • 2
  • 10
  • 35
0
votes
1 answer

htaccess trailing slash error

I understand somewhat similar questions have been asked and yes I did and read all the relevant answers and tried it all for quite some time. However I can't figure out what the error is. I believe the script is correct. What is going on? My problem…