FAQ Database Discussion Community


Capitalize both parts of a hyphenated word with Rails

ruby-on-rails,string,capitalization,hyphenation,cap
I'm trying to capitalize both parts of a hyphenated word with Rails: "hello-world".capitalize # => Hello-world "hello-world".titleize # => Hello World Is there a quick way of doing this? If not then I will write a custom solution, I can figure that out, but I'm hoping there is some really...

CSS Hyphens Not Working in Firefox?

css,firefox,hyphenation,css-hyphens
I am attempting to use CSS Hyphens. They work in IE 11 and Safari but does not work in Firefox properly and I am unsure why. Here is an example: .container{ width: 16.6667%; background:#ccc; } h3{ font-size: 0.95rem; font-weight: 600; -moz-hyphens: auto; -webkit-hyphens: auto; -ms-hyphens: auto; hyphens: auto; } <div...

In a UILabel, is it possible to force a line NOT to break at slash?

ios,uilabel,core-text,hyphenation
Example: My text is @"This is a great UI/UX feature". A better example: @"5/17 of this quantity". Is it possible to force the line NOT to break at the / (the slash)? I'm looking for a general way of doing, since I have others sentences with slashes....