utils

package
v2.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package utils is a package that contains all the utility functions

Copyright © 2021 Tonye Jack <jtonye@ymail.com>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Package utils is a package that contains all the utility functions

Copyright © 2021 Tonye Jack <jtonye@ymail.com>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Package utils is a package that contains all the utility functions

Copyright © 2021 Tonye Jack <jtonye@ymail.com>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatValue

func FormatValue(v string) string

FormatValue formats a string that would be outputed as markdown

func HasBytesInBetween

func HasBytesInBetween(value, start, end []byte) (found bool, startIndexes []int, endIndexes []int)

HasBytesInBetween checks if a byte array has a start and end byte array and returns true if and all occurrences of start and end

func ReplaceBytesInBetween

func ReplaceBytesInBetween(value []byte, startIndex int, endIndex int, new []byte) []byte

ReplaceBytesInBetween replaces a byte array between a start and end index with a new byte array

func WordWrap

func WordWrap(s string, limit int) string

WordWrap wraps lengthy words with the br html tag except code blocks, links, and code

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL