This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://stackoverflow.com/questions/32305891/index-of-a-substring-in-a-string-with-swift | |
extension StringProtocol where Index == String.Index { | |
func index(of string: Self, options: String.CompareOptions = []) -> Index? { | |
return range(of: string, options: options)?.lowerBound | |
} | |
func endIndex(of string: Self, options: String.CompareOptions = []) -> Index? { | |
return range(of: string, options: options)?.upperBound | |
} | |
func indexes(of string: Self, options: String.CompareOptions = []) -> [Index] { | |
var result: [Index] = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function configAddressBar (addHeight) { | |
var defaultHeight = 50; | |
if (typeof addHeight == "undefined") addHeight = 1; | |
function hideAddressBar() { | |
if(!window.location.hash) | |
{ | |
if(document.height < window.outerHeight) | |
{ | |
document.body.style.height = (window.outerHeight + defaultHeight + addHeight) + 'px'; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<key>Custom Keys</key> | |
<dict> | |
<key>Delete Line</key> | |
<string>moveToEndOfLine:, deleteToBeginningOfLine:, deleteToEndOfParagraph:</string> | |
<key>Duplicate Line Down</key> | |
<string>selectLine:, copy:, moveToEndOfLine:, insertNewline:, paste:, deleteBackward:</string> | |
<key>Duplicate Line Up</key> | |
<string>selectLine:, copy:, moveToBeginningOfLine:, paste:, moveUp:, moveToBeginningOfLine:</string> | |
<key>Insert line above</key> | |
<string>moveToBeginningOfLine:, insertNewline:, moveUp:, moveToBeginningOfLine:</string> |