BluePrint-Q
  • Namespace
  • Class

Namespaces

  • bpq
  • ski

Classes

  • bootstrap
  • convert
  • cz_checkbox_ctl
  • cz_color_palette_ctl
  • cz_date_picker_ctl
  • cz_detail_ctl
  • cz_divider_1_ctl
  • cz_divider_2_ctl
  • cz_drop_categories_ctl
  • cz_drop_ctl
  • cz_drop_image_sizes_ctl
  • cz_drop_menu_items_ctl
  • cz_drop_menus_ctl
  • cz_drop_pages_ctl
  • cz_drop_post_types_ctl
  • cz_drop_posts_ctl
  • cz_drop_tags_ctl
  • cz_drop_taxonomies_ctl
  • cz_drop_terms_ctl
  • cz_drop_users_ctl
  • cz_dummy_ctl
  • cz_media_library_ctl
  • cz_number_bar_ctl
  • cz_radio_image_align_x_ctl
  • cz_radio_image_align_y_ctl
  • cz_radio_image_alignment_ctl
  • cz_radio_image_ctl
  • cz_radio_image_sidebar_layout_ctl
  • cz_radio_image_site_span_layout_ctl
  • cz_radio_text_ctl
  • cz_text_area_ctl
  • cz_textbox_ctl
  • db
  • db_recordset
  • drop
  • mail
  • math
  • mb_checkbox_ctl
  • mb_ctl
  • mb_date_picker_ctl
  • mb_detail_ctl
  • mb_divider_ctl
  • mb_drop_ctl
  • mb_media_library_ctl
  • mb_number_bar_ctl
  • mb_radio_image_ctl
  • mb_radio_image_sidebar_layout_ctl
  • mb_radio_image_site_span_layout_ctl
  • mb_radio_text_ctl
  • mb_repeater_ctl
  • mb_text_area_ctl
  • mb_text_ctl
  • mb_text_notice_ctl
  • mb_textbox_ctl
  • media
  • metabox
  • path
  • post
  • question
  • sanitize
  • string
  • textbox

Traits

  • cz_supplement

Functions

  • customize_register_section
  • cz_enqueue
  • init
  • metabox_sample

Class string

A utility class for performing operations on strings.

Namespace: ski
Located at packages/ski.web/services/ski.service.string.php

Methods summary

public static string
# truncate( string $phrase, integer $num_words, string $read_more = '..' )

Returns the first X words from the given string, based on:
http://css-tricks.com/snippets/php/truncate-string-by-words/

Returns the first X words from the given string, based on: http://css-tricks.com/snippets/php/truncate-string-by-words/

Parameters

$phrase
string
$phrase The full string to analyze
$num_words
integer
$num_words The number of words to return
$read_more
string
$read_more The ellipses or something similar to put at the end of the truncated string

Returns

string
If first X words from the given string
public static boolean
# contains( string $haystack, string $needle )

Shortcut to determine whether one string is found within another.

Shortcut to determine whether one string is found within another.

Parameters

$haystack
string
$haystack
$needle
string
$needle

Returns

boolean
public static boolean
# starts_with( type $haystack, type $needle )

Shortcut to determine whether one string starts with another.

Shortcut to determine whether one string starts with another.

Parameters

$haystack
type
$haystack
$needle
type
$needle

Returns

boolean

Link

http://stackoverflow.com/questions/834303/startswith-and-endswith-functions-in-php
public static boolean
# ends_with( type $haystack, type $needle )

Shortcut to determine whether one string ends with another.

Shortcut to determine whether one string ends with another.

Parameters

$haystack
type
$haystack
$needle
type
$needle

Returns

boolean

Link

http://stackoverflow.com/questions/834303/startswith-and-endswith-functions-in-php
public static string
# lorem( )

Generates 'lorem ipsum' text.

Generates 'lorem ipsum' text.

Returns

string
public static If
# trim_start( type $haystack, type $needle )

Trims the beginning of a string of a given string. The start of the haystack must be an exact match of the needle for this to work.

Trims the beginning of a string of a given string. The start of the haystack must be an exact match of the needle for this to work.

Parameters

$haystack
type
$haystack
$needle
type
$needle

Returns

If
the needle was found, then the new haystack; otherwise, the old haystack

Link

http://stackoverflow.com/questions/4517067/remove-a-string-from-the-beginning-of-a-string

Magic methods summary

BluePrint-Q API documentation generated by ApiGen 2.8.0